Skip to content

This game about solving the Towers of Hanoi containing 3 posts and user-defined number of disks. It is written in python and makes use of graphics.py library to create visual effects.

Notifications You must be signed in to change notification settings

guptavasu1213/Hanoi-Towers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

hanoi-towers

This game about solving the Towers of Hanoi containing 3 posts and user-defined number of disks. It is written in python and makes use of graphics.py library to create visual effects.

Pre Requisites:

  • Python 3 or more installed

To run the game:

  • Clone/download the repository
  • Run the code of hanoi_towers.py

Rules:

  • Larger disk cannot be place atop of a smaller disk.
  • All the disks are supposed to be moved from pole A to pole C having smallest disk on the top and largest at the bottom.
  • Only the top-most disk can be moved from one pole to another.

How to play:

  • Click on the disk to move it and then click on the pole on which you want to move the disk.
  • While selecting the disk, if green color flashes, it means that the disk selected is valid.
  • If red color flashes when the disk is selected, it means that the disk selected is invalid.
  • When all the disks are successfully moved from pole A to pole C, then the user wins.

Tip:

  • By default the number of disks is 3.
  • If you wish to increase the difficulty by having more disks, then type the number in the text box on the top-right corner and hit reset.

About

This game about solving the Towers of Hanoi containing 3 posts and user-defined number of disks. It is written in python and makes use of graphics.py library to create visual effects.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages