The Tower of Hanoi is a classic game that helps to understand the concept of recursion. This project is built with HTML, CSS, and JavaScript.
To play the game, you must follow these three rules:
- Move One Ring at a Time: You can only move one ring during each turn.
- Upper Disk Movement: Each move consists of taking the upper disk from one of the stacks and placing it on top of another stack.
- Disk Size Constraint: No disk may be placed on top of a smaller disk.
- Interactive Gameplay: Visually demonstrate the Tower of Hanoi solution.
- Recursion Visualization: Understand how recursion works through the game's mechanics.
- Frontend: HTML, CSS, JavaScript
-
Clone the repository:
git clone [https://github.com/piyush-gangrade/tower-of-hanoi.git] cd tower-of-hanoi
-
Open
index.html
in your web browser.
- Start the game by loading
index.html
. - Follow the on-screen instructions to move the rings and solve the puzzle.
Enjoy mastering the Tower of Hanoi!