[Gtkboard-devel] help writing a game
Status: Beta
Brought to you by:
arvindn
|
From: nelson <gn...@ce...> - 2004-09-26 21:37:04
|
Hello :), Im writing a game for gtkboard, is an entertainment pencil and
paper game,Im firstly trying to write the Machine to Human type, but Im
a bit confused how to connect my machine-turn C code to the game_eval
and game_movegen hooks, you know, I have my own c algorithm for the
machine to choose its move from the existent board, but there is no an
easy hook where only put the position chosen by the Machine (that
position computed by a function of mine)...instead it seems gtkboard
forces me to use its functions for searching and calculating new
movements (game_eval and game_movegen), that sure are more powerful and
faster that my own but they are not well documented and I cant find out
how to use them. Questions about that:
- Is there an easy hook where to put the machine move computed by me
(avoiding game_eval and game_movegen)?
- What value Am I supposed to put on the float *eval argument?
- How Can I control the turn flow ?, because in my game a human can make
three moves in 3 clicks (3 events) and then pass the turn to the
machine,but it seems gtkboard passes the turn between human and machine
automatically after a one succesful move...
My game also will have levels of difficulty (machine thinking a bit
smarter).
Explaining of the game:
Initial Board:
X X X X X X X
X X X X X
X X X
Simple Rules:
Loose the one who removes the last piece.
In a turn, you can only remove pieces from one row, but you can remove
as many pieces as you want, for example the entire row.
PD: Thanks and sorry for the long text...
|