Thus each of the three stacks forms an irregular pyramid. The object of the puzzle is to move all of the disks from one stack to another, while moving only one disk at a time in accordance with the rules. We will come back to this puzzle later in the term, but in this version, you are the puzzle-solver, and the purpose of the program is to make sure you make only legal moves. You begin the session by specifying the number of disks. The program displays the top of the three stacks as three integers.
Larger integers stand for larger disks, and the letter E stands for an empty stack.
The stacks are named L , M , and R , and you specify a move by typing a disk to move and a place to put it. 8 legal moves. You can use any of the Stack classes we've developed for storing the stacks of the puzzle, but since you don't know have big a number may be typed in a linked-list based Stack may be a good choice. A printout of a run of your program showing the examples above. A debugging diary, describing the course of your design and debugging, any decisions you made or had to change, and any problems or successes you had getting it to run.