Go to the source code of this file.
Classes | |
struct | Game |
struct | WthorGame |
struct | OkoGame |
Typedefs | |
typedef struct Game | Game |
typedef struct WthorGame | WthorGame |
typedef struct OkoGame | OkoGame |
Functions | |
void | game_init (Game *) |
Create an empty game. More... | |
void | game_copy (Game *, const Game *) |
Game copy. More... | |
bool | game_get_board (const Game *, const int, Board *) |
Get the board after 'ply' move. More... | |
bool | game_update_board (Board *board, int x) |
update a board. More... | |
bool | game_check (Game *) |
Check a game. More... | |
bool | game_equals (const Game *, const Game *) |
Test if two games are equal. More... | |
void | wthor_to_game (const WthorGame *, Game *) |
convert a Wthor game to a Game. More... | |
void | game_to_wthor (const Game *, WthorGame *) |
convert a Game to a Whor game. More... | |
void | game_read (Game *, FILE *) |
Read a game from a binary file. More... | |
void | game_write (const Game *, FILE *) |
Write a game to a binary file. More... | |
void | game_import_text (Game *, FILE *) |
Read a game from a text file. More... | |
void | game_import_wthor (Game *, FILE *) |
Read a game from a Wthor file. More... | |
void | game_import_ggf (Game *, FILE *) |
Read a game from the Generic Game Format (ggf) file. More... | |
void | game_import_sgf (Game *, FILE *) |
Read a game from a sgf file. More... | |
char * | parse_ggf (Game *, const char *) |
Parse a ggf game from a string. More... | |
void | game_import_pgn (Game *, FILE *) |
Read a game from a pgn file. More... | |
void | game_export_text (const Game *, FILE *) |
Write a game to a text file. More... | |
void | game_export_ggf (const Game *, FILE *) |
Write a game to the Generic Game Format (ggf) file. More... | |
void | game_save_sgf (const Game *, FILE *, const bool) |
Write a game to the Generic Game Format (ggf) file. More... | |
void | game_export_sgf (const Game *, FILE *) |
void | game_export_pgn (const Game *, FILE *) |
Write a game to a pgn file. More... | |
void | game_export_wthor (const Game *, FILE *) |
Write a game to a Wthor file. More... | |
void | game_export_eps (const Game *, FILE *) |
Write a game to an eps file. More... | |
void | game_export_svg (const Game *, FILE *) |
void | game_import_oko (Game *, FILE *) |
Read a game from the "allinf.oko" file. More... | |
void | game_import_gam (Game *, FILE *) |
void | game_rand (Game *, int, struct Random *) |
Fill a game with some random moves. More... | |
int | game_analyze (Game *, struct Search *, const int, const bool) |
Analyze an endgame. More... | |
int | game_complete (Game *, struct Search *) |
Terminate an unfinished game. More... | |
void | line_to_game (const Board *, const Line *, Game *) |
Build a game from an initial position and a move sequence. More... | |
int | game_score (const Game *) |
Compute the final score of the game, for the initial player. More... | |
int | move_from_wthor (int) |
Coordinates conversion from wthor to edax. More... | |
Header file for game management
bool game_check | ( | Game * | game | ) |
void game_export_eps | ( | const Game * | game, |
FILE * | f | ||
) |
Write a game to an eps file.
game | The input game. |
f | The file stream. |
void game_export_ggf | ( | const Game * | game, |
FILE * | f | ||
) |
Write a game to the Generic Game Format (ggf) file.
game | The output game. |
f | The file stream. |
void game_export_pgn | ( | const Game * | game, |
FILE * | f | ||
) |
Write a game to a pgn file.
game | The input game. |
f | The file stream. |
void game_export_sgf | ( | const Game * | , |
FILE * | |||
) |
void game_export_svg | ( | const Game * | , |
FILE * | |||
) |
void game_export_text | ( | const Game * | game, |
FILE * | f | ||
) |
Write a game to a text file.
game | The input game. |
f | The file stream. |
void game_export_wthor | ( | const Game * | game, |
FILE * | f | ||
) |
Write a game to a Wthor file.
game | The input game. |
f | The file stream. |
Get the board after 'ply' move.
game | Game. |
ply | number of move. |
board | output board. |
void game_import_gam | ( | Game * | , |
FILE * | |||
) |
void game_import_ggf | ( | Game * | game, |
FILE * | f | ||
) |
Read a game from the Generic Game Format (ggf) file.
game | The output game. |
f | The file stream. |
void game_import_oko | ( | Game * | game, |
FILE * | f | ||
) |
Read a game from the "allinf.oko" file.
game | The output game. |
f | The file stream. |
void game_import_pgn | ( | Game * | game, |
FILE * | f | ||
) |
Read a game from a pgn file.
game | The output game. |
f | The file stream. |
void game_import_sgf | ( | Game * | game, |
FILE * | f | ||
) |
Read a game from a sgf file.
game | The output game. |
f | The file stream. |
void game_import_text | ( | Game * | game, |
FILE * | f | ||
) |
Read a game from a text file.
game | The output game. |
f | The file stream. |
void game_import_wthor | ( | Game * | game, |
FILE * | f | ||
) |
Read a game from a Wthor file.
game | The output game. |
f | The file stream. |
Fill a game with some random moves.
game | The output game. |
n_ply | The number of random move to generate. |
r | The random generator. |
void game_read | ( | Game * | game, |
FILE * | f | ||
) |
Read a game from a binary file.
game | The output game. |
f | The file stream. |
void game_save_sgf | ( | const Game * | game, |
FILE * | f, | ||
const bool | multiline | ||
) |
Write a game to the Generic Game Format (ggf) file.
game | The output game. |
multiline | A flag to create a long text or a single line. |
f | The file stream. |
int game_score | ( | const Game * | game | ) |
Compute the final score of the game, for the initial player.
game | An input game. |
convert a Game to a Whor game.
The wthor format is famous as all main event games are recorded into this format.
game | An input game. |
thor | The wthor output game. |
bool game_update_board | ( | Board * | board, |
int | x | ||
) |
update a board.
void game_write | ( | const Game * | game, |
FILE * | f | ||
) |
Write a game to a binary file.
game | The input game. |
f | The file stream. |
Build a game from an initial position and a move sequence.
initial_board | Initial board. |
line | Move sequence. |
game | The output game. |
int move_from_wthor | ( | int | x | ) |
Coordinates conversion from wthor to edax.
x | wthor coordinate. |
char* parse_ggf | ( | Game * | game, |
const char * | string | ||
) |
Parse a ggf game from a string.
game | The output game. |
string | An input string. |