This is a Towers of Hanoi game implemented using ReactJS. The Towers of Hanoi is a classic mathematical puzzle that consists of three rods and a number of disks of different sizes. The objective of the puzzle is to move the entire stack of disks from one rod to another following a few simple rules.
1- Clone the repository to your local machine using the following command:
git clone https://github.com/bilouStrike/Towers_of_Hanoi.git
2- Navigate to the project directory:
cd Tower_of_Hanoi
3- Install the required dependencies:
npm install
1- Start the application by running the following command:
npm run dev
The game consists of three rods and a number of disks of different sizes represented by colored circles. The largest disk is at the bottom, and the size decreases as we move up.
The objective is to move all the disks from rod A to rod C, using rod B as an intermediate rod. The following rules must be followed:
1- Only one disk can be moved at a time. 2- Each move consists of taking the top disk from one of the rods and placing it on top of another rod or an empty rod. 3- A larger disk cannot be placed on top of a smaller disk. 4- To make a move, follow these steps:
- Click on the rod from which you want to move a disk.
- Click on the rod to which you want to move the selected disk.
- The game will display the current state of the rods and update them with each move. Keep making moves until you successfully move all the disks to rod C.
The following technologies were used to develop the Towers of Hanoi ReactJS app:
- React/Typescript.
- Styled-component
- bundler: vitejs
This React App is licensed under the MIT License. Feel free to use, modify, and distribute the code as per the terms of the license.