This repository contains a Python implementation of the Towers of Hanoi game. The game is implemented using a stack-based approach and consists of several Python scripts:
node.py
: Defines the Node class used to represent disks in the game.stack.py
: Defines the Stack class used to represent the towers and perform the game operations.script.py
: Main script that executes the Towers of Hanoi game.
The game is a fun and quirky implementation that provides a challenge (partly due to the lack of a UI).
To play the Towers of Hanoi game, run the script.py
file using Python. Follow the on-screen instructions to move disks between towers and solve the puzzle.
-
Clone the repository:
git clone https://github.com/pestopasta74/Towers-of-Hanoi.git
-
Navigate to the repository directory:
cd Towers-of-Hanoi
-
Run the game script:
python script.py
Contributions to improve the game or add new features are welcome! Feel free to fork the repository, make your changes, and submit a pull request.
- Preston Whiteman (@pestopasta74)
This project is licensed under the MIT License.