This is the doxygen documentation for gtkboard.
.
#include <game.h>
Data Fields | |
byte* | board |
An array representing the pieces of each square. More... | |
int* | render |
Additional information about how to render the square. More... | |
Player | player |
Which player has the move. More... | |
void* | state |
State information required to completely describe the position. More... | |
int | num_moves |
The number of moves that have been made to reach the current position. More... | |
void* | ui_state |
Client-side state information () (currently unused). |
Definition at line 212 of file game.h.
|
An array representing the pieces of each square. The size of the array is board_wid * board_heit. For each pair (x, y), board[y * board_wid + x] is a value between 0 and num_pieces inclusive which gives the piece at the square (x, y). 0 always indicates an empty square. The origin of the coordinates is at the bottom left. |
|
The number of moves that have been made to reach the current position. In two-player games, it represents the number of ply. |
|
Which player has the move. Currently this is unused, and a separate argument gets passed to every function along with the Pos. This will change soon. |
|
Additional information about how to render the square. For example, highlight, shade, hide etc. See RenderType |
|
State information required to completely describe the position. Some games are stateful, which means that the position can not be completely described by the state of the board alone. In chess (chess.c), for example, we need to keep track of whether either player can castle, etc. The variable state points to a struct which is defined by the game. It is modified using the function game_newstate. |
|
Client-side state information () (currently unused).
|