Skip to content

Implementation of Towers of Hanoi in C++ and Allegro with an option for the user to play it themselves :)

Notifications You must be signed in to change notification settings

EricKarpovits/Towers-of-Hanoi-Project

Repository files navigation

Towers of Hanoi - Eric Karpovits

The Towers of Hanoi is a game in which a stack of disks is moved from the first peg to a third peg with the help of an intermediate post. Only one disk may be moved at one time and larger disks may never be on top of smaller disks.

3Blue1Brown Towers of Hanoi Video Explanation: link

This project represents the culmination of the Algorithms/Recursion unit.

The game was inspired by Math is Fun

Levels of Achievement:

  • C : Use console to create an animation of recursive solution.
  • A-: Use Allegro to create an animation of the recursive solution. Hard coding number of discs is OK.
  • A : Use Allegro to create a clickable walk through of the recursive solution. User should be able to change number of discs (typical range is 5 - 7).
  • A+: Make the game also playable by the user.
    • All Levels Achieved