Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mahirsalahin/towers-of-hanoi
The Tower of Hanoi.
https://github.com/mahirsalahin/towers-of-hanoi
Last synced: about 1 month ago
JSON representation
The Tower of Hanoi.
- Host: GitHub
- URL: https://github.com/mahirsalahin/towers-of-hanoi
- Owner: MahirSalahin
- Created: 2023-07-01T15:14:11.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-06-03T22:01:23.000Z (7 months ago)
- Last Synced: 2024-11-21T10:46:49.294Z (about 1 month ago)
- Language: Java
- Homepage:
- Size: 678 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Towers_of_Hanoi
The Tower of Hanoi (also called The problem of Benares Temple or Tower of Brahma or Lucas' Tower and sometimes pluralized as Towers, or simply pyramid puzzle) is a mathematical game or puzzle consisting of three rods and a number of disks of various diameters, which can slide onto any rod.The puzzle begins with the disks stacked on one rod in order of decreasing size, the smallest at the top, thus approximating a conical shape. The objective of the puzzle is to move the entire stack to the last rod, obeying the following rules:1.Only one disk may be moved at a time.
2.Each move consists of taking the upper disk from one of the stacks and placing it on top of another stack or on an empty rod.
3.No disk may be placed on top of a disk that is smaller than it.With 3 disks, the puzzle can be solved in 7 moves. The minimal number of moves required to solve a Tower of Hanoi puzzle is 2n − 1, where n is the number of disks.
Source:https://en.wikipedia.org/wiki/Tower_of_Hanoi
## Demo:
![GIF](https://github.com/MahirSalahin/Towers_of_Hanoi/blob/main/Towers_of_Hanoi_Simulation.gif)