Towers of Benoi 1.5
Background
This is a little game I made while tying to learn how to develop for the BeOS.
I played around with the Drag&Drop-features of the OS and with the messaging stuff this implies.

As I saw that nobody released a 'Tower of Hanoi'-game, I chose to release mine.

Source Code
After I added quite some features, found and removed some bugs last week and did a lot of
cleaning up, I will publish the source code including the R3 x86 project file.
I commented a lot and it took me four hours to do that. Every newcomer developer is invited to have a look at the source code. Perhaps he may find something usefull. I put notes to some facts that I found remarkable. Mostly, these are facts, that I stumbled across and that cost my a lot of debugging time. Developers, please read the contact section below. When you're interested in the code, start reading with Towers.h.

Rules
If you're unfamiliar with it...
You see a tower made of 'bars' or 'discs' of different sizes (in my original game, these are wooden discs) in a window named 'Tower A'. The goal is to move the discs and to pile them up to a tower in the window 'Tower B' or 'Tower C'.
There are two rules:
- You can only move the discs one by one
- you cannot stack a larger disc on a smaller one.

Controls
You move the discs by intuitiv dragging them from one window and dropping them into another.  When dragging, you will get the uppermost disc of the tower, which always will be the smallest on that tower. When dropping, the disc will be stacked on top of the tower or will start a new tower, if the window was empty (well, just try it, you'll see what i mean). You are not allowed to put a bigger disc on a smaller.
On the other hand, there's a control window, which offers thousands of control possibilties to you: you can reset the towers to any height between 2 and 10 (default at game start is 4), you can quit the game, you can get the wonderful 'About' Box and can....

Auto Solve
If you don't believe the task can be done at all, you may watch the game solve itself. This will reset the towers and start solving the  game. Wile watching, you can speed up or slow down the thing with the slider in the control window. You may also just stop the solving process with that cool button in the window. Note that you cannot (yet)  resume it, after you pressed the button, but you can continue the game from that position on.
BTW: Auto Solve will need 15 moves with the 4 discs, so you now know what to aim at.
Another BTW: This is not linear! With 5 discs, you will need 31 moves. Guess the rest.....

History 

V1.5:
- I added the History Window
- The Game can now be reset to another number of discs (2-10)
- I changed the screen layout a bit: the three towers are now displayed in a common window, which also has the menu; the control window is only used for auto solving (and is only visible then), and the history window is shiny new.
- The Control Window got a beautyful Stop-Button
- I cleaned up the code completely, commented it and publish it.

V1.0:
This was the first release.
The Towers were displayed in three different windows.
The Number of discs was fixed (to 4)
There was no Move History or Move Counter at all.
Sadly, but it was the first release ;-)

Known Issues
- Auto Solve can't solve the game from where you left it. It always resets the game at first (guess why...)
- Dragging might not always work as expected, as it does only get drags from the 'tower view' on the window (don't click to low!).
- Stopping the auto-solving by any means (closing the window or just pressing 'stop') may be a little bit delayed with a lot of discs in play. This is caused by the recursion overhead. Perhaps, I will find a better way to do that (spawn another thread and kill that or something like that)
- Auto-Solving at highest speed might lock up in very special cases. If this happens, you will see one discs on two different towers... This happens because I can't get synchronous messaging (waiting for replies) get working and I don't want to make the message protocol  more complicated.
- Speaking of the source: The game might not compile or run as expected on R4. As I read some days ago, there will be another messaging system. This might concern the messaging protocol I use in the game, but I'm not sure. Sadly, I didn't get R4 beta, as I was not an the list at that time [Hey Be, can we do anything there?]

Contact
If you like, play or dislike the game, feel free to contact me and tell me, where you are. If you take a daring look at the source and find it useful/amusing/helpful for your problem or simply like the huge amount of comments in there, drop me a note, too. Hey, I just tortured my brain for 5 hours reading, commenting and writing in a foreign language, just for YOU ;-)
To put a long story short: I'd really like to get an eMail or a postcard from far far away saying 'Hey, I like this little game' or something like that. 

Send Flowers to:
	Marco Zinn
	Am alten Sportplatz 9
	75053 Gondelsheim
	Gemany

Or send some recycled bytes to
	marco.zinn@gmx.de
