For my senior project I choose to do a game based on the Towers of Hanoi. The Towers of Hanoi is a legend made up by the mathematician Edouard Lucas in the year 1883. The legend states that somewhere in India there is a jungle where a group of Hindu monks guard three towers. On one of these towers there are 62 rings, which decrease in size as you go up. Supposedly the monks must move these rings from one pole to another. When the last ring has been moved the end of the world will have arrived. There are two rules for moving the rings. First you can't move a ring if another ring is on top of it, and second you may never put a larger ring on top of a smaller one.
The game is three-dimensional. The player chooses the number of rings by pressing the right mouse button. Once the mouse button is pressed a menu will pop up. The player then chooses one of thirteen options. The last twelve will select the number of rings, while the first one will exit the game.
In order to move the rings from pole to pole, use the left mouse button. Choose a ring by pressing and holding the left mouse button while pointing to that ring. After the ring has been selected drag the mouse to the desired target pole and release the button. The ring will be redrawn on that pole unless the rules were violated. If the rules are violated nothing will happen.
This project was meant to help me prepare for graduate school. I believe I do understand more about three-dimensional design as well as OpenGL. I did this project by using code that relied heavily on the OpenGL programming language. Not only do I understand a little more about OpenGL but I also understand the importance of well done documentation. While creating my objects and colors I used documentation to show what code belonged with what object. I also understand more about long programming. My program ended up being forty-one pages long. All of the pages from page fifteen to page forty contain one function. This is the function responsible for all of the movement in the rings including the rules. I learned the importance of reusing code while writing this function.
Advisor: Susan Reiser