Switch branches/tags
Nothing to show
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
Disk.py
Hanoi.py
README.md
Rectangle.py
output.gif

README.md

Tower of Hanoi

This piece of code intents to solve the Tower of Hanoi problem in a graphical way, probably making use of different methods.

The code display a Tower of Hanoi play set on the screen, using pyglet library, and start playing the game automatically. Discs start moving from column to column, playing the rule of the game, until the final configuration is achieved, when the game ends.

Game can be ended by pressing ESC key or closing the window.

You can find a real wooden Tower of Hanoi playset that I crafted here, which gave me the inspiration to write this piece of code. Tower of Hanoi wooden playset

Getting Started

Clone this repository on your local disk by executing. You will download as well other small projects

git clone https://github.com/kokomero/miscelanea/

Prerequisites

Install numpy and pyglet packages, these are available in the Python pip repository

Execution

python Hanoi.py

The result of the execution should be a windows like the following one: Animation video

Deployment

Add additional notes about how to deploy this on a live system

Contributing

Feel free to contribute to this piece of code, maybe by adding a graphical interface

Authors

License

No licence for this project

Acknowledgments

  • pyglet library
  • Édouard Lucas for inventing the game