Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask DOT NET Expert

Task: Design and implement Tower of Hanoi Puzzle program using C# and Windows Presentation Foundation (WPF) template in Visual Studio 2012 or newer. 

The Tower of Hanoi Puzzle involves a stack of n graduated disks and a set of three needles called A, B and C. The initial setup places the n disks on needle A. The task for the program is to move the disks one at a time from needle to needle until the process rebuilds the original stack, but on needle C. The challenge is the fact that at no time a larger disk can be placed on top of a smaller disk. More details can be found at the following web pages: http://en.wikipedia.org/wiki/Tower_of_Hanoi and http://mathworld.wolfram.com/TowerofHanoi.html. 

Requirements: 

Your design and implementation should satisfy the following requirements:

1. When a player starts your program, three empty needles appear. 

2. The player enters a number between 1 and 10 inclusive to set the number of disks. All disks are placed on the left needle in ascending order (the smallest at the top).

3. The player chooses a level (easy, medium or hard) then starts playing. A countdown timer appears showing the time left for playing.

4. The player can use computer mouse to move disks as follows: 

a. Only one disk may be moved at a time.

b. Each move consists of taking the upper disk from one of the needles and sliding it onto another needle, on top of the other disks that may already be present on that needle.

c. No disk may be placed on top of a smaller disk.

5. If the player completes the puzzle before the timer ends, the player is asked to enter player name. Player name, playing time (in seconds) and puzzle level will be saved to a text file. If no player name is entered, ‘anonymous’ will be saved instead. If the player plays the puzzle again and the new playing time is shorter than the saved time (with the same level), your program will update the saved time with the new time then saves it. 

6. The text file contains a list of player names, times in seconds, and levels. No duplicate is found for player names (i.e., a player name appears only once in the list). The list is sorted by playing time in ascending order (the shortest time is at the top). You have to use a sorting algorithm in lecture notes to do this.

7. If the player wants to know his/her shortest time for a particular level saved in the text file, your program is able to show it and you have to use a search algorithm in lecture note to implement this request.

8. Your program can provide an animated solution to show how to solve the puzzle with a given number of disks. You use a recursive algorithm in lecture notes to do this.

9. Your program needs to handle all exceptions. 

10. You need to use XML comments and Microsoft convention styles for writing C# code and indentation. 

DOT NET, Programming

  • Category:- DOT NET
  • Reference No.:- M9729969

Have any Question?


Related Questions in DOT NET

Assignment specificationthis assignment is split into two

ASSIGNMENT SPECIFICATION This assignment is split into two documents. 1. Assignment Specification. This document contains the specification for what you will be required to do. 2. Assignment Addendum. This document conta ...

Casewe sell pdfs from our site and pdfs can be ordered from

Case We sell pdf''s from our site and pdfs can be ordered from the site by selecting a book, putting it in a shopping cart, then signing in with a password or as a guest, and then checking out. For some reason, when a pu ...

Scenariouser modelling inc would like to organize a series

Scenario User Modelling Inc. would like to organize a series of conferences focusing on research topics in the area of user adaptive systems and personalization. They need to organize annual conferences for researchers a ...

Summarythis assessment requires you to develop a simple

Summary This assessment requires you to develop a simple text editor with a basic offline user login. It is a windows application that will allow new uses to be added, existing users to login, and to create/save/edit tex ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As