tower-of-hanoi
A python command-line implementation of the classic Tower of Hanoi game.
File Browser:
README
Tower of Hanoi
A python command-line implementation of the classic Tower of Hanoi game.
How to Run
Open your terminal or command prompt and run:
python hanoi.py
(If that doesn't work, try python3 hanoi.py)
How to Play
- Select number of rings (1-10)
- Move all rings from Tower A to Tower D
- Use two-letter commands to move rings:
AS- move from A to SAD- move from A to DSD- move from S to D- etc.
Special commands:
- Q - Quit
- R - Restart
Rules
- Only one ring can be moved at a time
- A ring can only be placed on top of a larger ring
- You can use Tower S as an auxiliary tower
Good luck!