Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions ReadME.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Animation of Tower of Hanoi

This C++ program performs the Animation of the Tower of Hanoi. In this there will be three Rods and a number of rings which will perform the operation how the rings transfer from One rod to another rod with the help of middle rod.

## How to Run

1. Make sure you have a C++ compiler and OpenGl installed on your system. You also need to install Visual Studio(Not the Visual Studio Code).

2. Download the `Tower_of_Hanoi.cpp` file, which contains the C++ code for the Tower_of_Hanoi program.

3. Compile and Run the code using the Local Windows Debugger.


# How it Works

- The program defines many functions but i will tell about the important functions:
1. Initialize_game
It will Initialize the Board , Disc and Rod.
2. draw_solid_cylinder
It will draw the rod on the Board.
3. keyboard_handler
As it says from the name it will work on selected keys from the keyboard.

- Many function have the same name as they are working.

- After continue the program it will Run using 'S' press from keyboard.

- Finally, the program displays the animation of disc transfer from one rod to another rod .
Loading