Tower of Hanoi Game
Using JavaScript for functionality & interactivity and CSS for styling & animations
Fully responsive layout, using media queries and flexbox.Instructions
-
Rules:
- The objective of the game is to move the entire stack to the last rod.
- Only one disk may be moved at a time.
- Each move consists of taking the upper disk from one of the stacks and placing it on top of another stack or on an empty rod.
- No disk may be placed on top of a disk that is smaller than it.
-
To move a disk, just use your mouse and drag & drop the selected disk into a rod.
For touch screen devices, we use touch events, so click on the disk of your choice & then click on a rod to drop it.
- You can adjust the tower size by clicking the dropdown located at the controls area at the bottom