gTowers

Erik on Sep 9th 2005

gTowers is a simple Objective-C implementation of the Towers Of Hanoi game. I wrote it to try out Cocoa development.

There are two things that I think are interesting about this project. One, the algorithm can solve the puzzle from any state, not just the starting state. Two, I actually built the program under Linux using GNUstep, and then ported it to Xcode on OS X. The project builds on both platforms with no IFDEFs required.

The code is pretty ugly, as it is my first Obj-C project, but I’ve decided to put it online anyway. The OS X build is here as well. Sorry, there is no version for Windows. I don’t even know if a Windows build is possible.

Edit: hmm… the version posted here seems to have a bug with the threading/locking on the solve function. You can crash it if you try hard. I’ll have to put up a clean build one of these days.

No responses yet

Comments are closed.