The Tower of Hanoi
  Resume and Contact Info  

The Tower of Hanoi: Solving the Puzzle

The Tower of Hanoi is a classic computer science problem. The rules are simple: move all the disks on one peg to another peg. There are only two restrictions:

  1. You may only move one disk at a time.
  2. You may not move a larger disk onto a smaller one.
Start the game by choosing a level (those ugly yellow ovals). The minumum number of moves possible to solve the puzzle will appear just beneath the three towers.

Pick up a disk by clicking on (or near) the disk that you want to move. Move it by clicking on any other tower -- remember, the disk you've got has to be smaller than the topmost disk on the tower to which you want to move.

The Tower will change color if you click on it correctly; it will change back to white if you click on it again. Nothing happens if you try to make an illegal move.

Caveats:



Here's the source: Tower.java
(Written by Michael Shea.)

Other (Non-professional) Links.
Out to the Front Cover.
E-mail Shea.