Quote Originally Posted by maxpower View Post
Well I got the program and it compiled but what is the purpose/rules of the game? Also the "Solve" feature seemed to error out as it was going along and then a message popped up about not putting a circle in the right place. Then it just sat there, unless of course the puzzle was solved but I couldn't tell.

mAx
Searching on the net will bring you the answer you need but I'd rather explain th rules here because any search will also lead you to the optimal solution algorithm (used in the solve function which shouldn't be able to cause error by the way, unless you already started to move disks around).

The rules are very simple :
  • n disks are on the first peg, biggest at the bottom and the goal is to move them to the last peg using the smallest possible number of moves
  • you can only move one disk at a time and only the one on top of each pegs
  • to move a disk to another peg it must be smaller than any other disk that may be present on the target peg already.
FYI it has been proved that the optimal solution is 2^n - 1 moves. So the "default" game (if you don't use the spinbox to change the number of disks) is 15 moves. Good luck.