Hanoi Visualizer is an interactive Tower of Hanoi simulation featuring smooth visuals, easy keyboard controls, and a built‑in auto‑solver algorithm to showcase the optimal sequence.
- 🎨 Dynamic Canvas Rendering – Clean and responsive tower and disk visuals.
- ⌨️ Keyboard Controls – Seamless manual gameplay.
- 🤖 Auto-Solver Algorithm – Watch the optimal moves step by step.
- 📱 Lightweight & Responsive – Works smoothly on modern browsers.
- Frontend: HTML, CSS, JavaScript
- Logic: Custom
script.js
andsolver.js
for game mechanics and auto-solving.
Hanoi-Visualizer/
├── index.html
├── style.css
├── script.js
├── solver.js
└── README.md
git clone https://github.com/dj-ayush/Hanoi-Visualizer.git
cd Hanoi-Visualizer
Simply open index.html in your preferred browser.
Key / Button | Action |
---|---|
⬅️ ➡️ | Move selection between towers |
⬆️ ⬇️ / Space / Enter | Pick up or place a disk |
UI Buttons | Change disk count or toggle auto‑solver |
We welcome contributions!
- Fork the repo
- Create a new branch:
git checkout -b feature-name
- Commit your changes:
git commit -m "Added feature"
- Push to your branch:
git push origin feature-name
- Create a pull request 🚀
Experience the project in action here:
👉 Live Demo
This project is licensed under the MIT License.
Built with ❤️ by @dj-ayush