Tower of Hanoi
Create three Tower (eg)A,B,C
Create three Disk (eg) 1,2,3, Make sure the length 1>2>3
Place all the Disc on Tower A , Disk 1 on the Bottom then Disk 2 then Disk 3
Move the Disk from Tower A to Tower C, one by one( you can place Disk 2 on top of Disk 1 and Disk 3 on top of disk 2)
At the end u have to have a Solve Button and Reset Button
When you press solve the system should automatically solve the puzzle,
When you press Reset Button all the Disk should be place back in Tower A,
Honestly, this is a textbook programming example, you should learn to do your own research. Just sayin'.
OK,
I am using one text book too, they didn't talk anything about Tower of Hanoi,
Its only past 3 -weeks since I started studying java script.
Thanks for the Replay!!!
Bookmarks