Towers of Hanoi

  scripts
  sprites
See inside
Instructions

Towers of Hanoi is a game where goal is to move a stack of disks from one peg to another following a few simple rules. First, you may only move 1 disk at a time. Second, you may not place a larger disk on top of a smaller disk. Can you help solve the puzzle by moving all the disks from peg 1 to peg 3?

Start by remixing this project and then take a look at the scripts for the stage (i.e. the background). You'll see a couple of custom blocks. First, there is a custom block called MoveOneDisk that moves one disk from the "from" peg to the "to" peg. You can use this block to move the disks. The second custom block is called SolveIt. This is the block that runs when the Run button is clicked. Currently, it only moves a single disk from peg 1 to peg 3. Modify this block (and add any new blocks that you need) to help solve the puzzle.

Share your solutions or ask for help on CoderDojo Metuchen's facebook site.

Notes and Credits

Shared: 31 May 2015 Modified: 21 Nov 2015
Favorite this project 0
Love this project 0
Total views 30
View the remix tree  1
  
More projects by DisturbedSaint