Skip to content

A Tower of Hanoi game using HTML, CSS, and JavaScript to illustrate recursion concepts through ring movement rules.

Notifications You must be signed in to change notification settings

piyush-gangrade/tower-of-hanoi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Tower of Hanoi

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.

Game Rules

To play the game, you must follow these three rules:

  1. Move One Ring at a Time: You can only move one ring during each turn.
  2. Upper Disk Movement: Each move consists of taking the upper disk from one of the stacks and placing it on top of another stack.
  3. Disk Size Constraint: No disk may be placed on top of a smaller disk.

Features

  • Interactive Gameplay: Visually demonstrate the Tower of Hanoi solution.
  • Recursion Visualization: Understand how recursion works through the game's mechanics.

Technologies Used

  • Frontend: HTML, CSS, JavaScript

Installation

  1. Clone the repository:

    git clone [https://github.com/piyush-gangrade/tower-of-hanoi.git]
    cd tower-of-hanoi
  2. Open index.html in your web browser.

Usage

  1. Start the game by loading index.html.
  2. Follow the on-screen instructions to move the rings and solve the puzzle.

Enjoy mastering the Tower of Hanoi!

About

A Tower of Hanoi game using HTML, CSS, and JavaScript to illustrate recursion concepts through ring movement rules.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published