Tower-Of-Hanoi

This is the ‘Tower of Hanoi’ game written in C with console graphics. The objective of the game is to move all the disks over the last tower on the right. But you cannot place a larger disk onto a smaller disk.

Console Screenshot

How to run the game

First of all make sure you are on the Windows platform as the game uses the <windows.h> library to control the graphics in the console and make sure you have installed a C compiler (eg. gcc). To compile the game just use the following command:

gcc main.c -o tower-of-hanoi.exe

After compiling it, you just have to run the file ‘tower-of-hanoi.exe’ just created.

GitHub

View Github