This is my second attempt to implement various approaches to make a computer play Connect 4 on a resonable level and my first BeOS programme. The current version only has the very simple algorythm I call Maniac.
I think everybody knows the rules for this game but here we go:
The object of the game is to build a line of four stones of your colour. This line can be horizontally, vertically and diagonally over the board.
You create this line by dropping stones into the columns of the board. Each players turn, he/she is allowed to drop a stone of his/her colour in one of the seven columns. After doing that, it's the other players turn.
Whoever manages to complete a line, wins the game.
Currently I have only implemented a very basic strategy named Maniac. It more or less drops stones at random (with 1-2 checks if there is a chance to win by dropping at a specific point).
Various other strategies (and a preferences menu) will be implemented in the next few days.
The current preview release still has it's data files lying around openly in the installation directory. Why? There are two reasons for it. I was too lazy to create a data file or resource from them and there might be cool graphics ppl out there that want to do some settings for the game. You can take my supplied bitmaps as templates to do your own stuff. Oh, one thing, the bitmaps for the chip's are not allowed to be larger than 32*32. All gfx are 24 (32) bit and pure white (255,255,255) becomes translated to B_TRANSPARENT_32_BIT ... that should be all... ;)
If you have any comments or gfx settings or something, drop me an email at:
becode@comfix.com
Oh yes, and I still need someone to compile the PPC-Version ;)