|download source code|
This program is color lines game. Computer can analyze the position and shows best move. Computer can play automatically as well. The program is free, written on Visual C++, and has open source code.
On new game one can choose some parameters
- total colors: six, seven or eight (six by default). If you can play quite good you can enlarge this value.
- throw balls: three, four or five (three by default). This parameter is define how many balls will appear at any time. If you set four or five balls it will be very difficult to play.
- auto cleaning, is set by default. If this flag is set then if five balls in a row appear they vanish automatically.
Store/load the game
If anyone can play for a long time it's possible to store and load a game.
Undo last move
One can undo last move, but it's not possible to undo two moves in a row.
At any time one can see best move from computer point of view. To see the move press right mouse button. If you want to follow computer move, press left mouse button on the end cell. After it you can see best move it you press right mouse button another time.
At request it's possible to run automatic game. To do it press double click with right mouse button. To stop the game do double click with right mouse button once again. Computer get approx 10,000-20,000 points in the game.
Note. The computer game didn't optimize by speed. The goal was to find quite good algorithm for automatic playing. Computer get about 1,000 points per minute.
The score counter rule is very simple. If N balls disappear then score will increase by N*(N-4). If ten balls vanish then program add 10*(10-6)=60 points.