| 
    My Project
    
   | 
 
#include "bit.h"#include "const.h"#include "game.h"#include "move.h"#include "opening.h"#include "options.h"#include "play.h"#include "settings.h"#include <assert.h>Functions | |
| void | play_init (Play *play, Book *book) | 
| Initialization.  More... | |
| void | play_free (Play *play) | 
| Free resources.  More... | |
| void | play_new (Play *play) | 
| Start a new game.  More... | |
| bool | play_load (Play *play, const char *file) | 
| Load a saved game.  More... | |
| void | play_save (Play *play, const char *file) | 
| Save a played game.  More... | |
| void | play_update (Play *play, Move *move) | 
| Update the game.  More... | |
| bool | play_is_game_over (Play *play) | 
| Check if game is over.  More... | |
| bool | play_must_pass (Play *play) | 
| Check if player must pass.  More... | |
| void | play_go (Play *play, const bool update) | 
| Start thinking.  More... | |
| void | play_hint (Play *play, int n) | 
| Start thinking.  More... | |
| void | play_hint_for_lib (Play *play, int n, HintList *hintlist) | 
| hint for libEdax  More... | |
| void | play_get_bookmove (Play *play, MoveList *book_moves) | 
| get book move for libEdax  More... | |
| int | play_get_bookmove_with_position (Play *play, MoveList *book_moves, Position *position) | 
| get book move for libEdax  More... | |
| void | play_hint_prepare (Play *play, MoveList *exclude_list) | 
| prepare hint for libEdax  More... | |
| void | play_hint_next (Play *play, Hint *hint, bool multiPvDepthMax) | 
| get next hint  More... | |
| void * | play_ponder_run (void *v) | 
| do ponderation.  More... | |
| void | play_ponder (Play *play) | 
| Ponder.  More... | |
| void | play_stop_pondering (Play *play) | 
| Stop pondering.  More... | |
| void | play_stop (Play *play) | 
| Stop thinking.  More... | |
| void | play_undo (Play *play) | 
| Undo a move.  More... | |
| void | play_redo (Play *play) | 
| Redo a move.  More... | |
| void | play_set_board (Play *play, const char *board) | 
| Set a new board.  More... | |
| void | play_set_board_from_FEN (Play *play, const char *board) | 
| Set a new board.  More... | |
| void | play_set_board_from_obj (Play *play, const Board *board, const int turn) | 
| Set a new board.  More... | |
| void | play_game (Play *play, const char *string) | 
| Play a move sequence.  More... | |
| bool | play_move (Play *play, int x) | 
| Play a move.  More... | |
| bool | play_user_move (Play *play, const char *string) | 
| Play a user move.  More... | |
| Move * | play_get_last_move (Play *play) | 
| Get the last played move.  More... | |
| static int | play_alternative (Play *play, Move *played, Move *alternative, int *depth, int *percent) | 
| Seek for the best alternative move.  More... | |
| static void | play_write_analysis (Play *play, const Move *m, const Move *a, const int n_moves, const int depth, const int percent, FILE *f) | 
| Write a line if an analysis.  More... | |
| void | play_analyze (Play *play, int n) | 
| Analyze a played game.  More... | |
| static int | play_book_alternative (Play *play, Move *played, Move *alternative) | 
| Seek for the best alternative move from the opening book.  More... | |
| void | play_book_analyze (Play *play, int n) | 
| Analyze a played game.  More... | |
| void | play_store (Play *play) | 
| store the game into the opening book  More... | |
| void | play_adjust_time (Play *play, const int left, const int extra) | 
| adjust time.  More... | |
| void | play_print (Play *play, FILE *f) | 
| Print the game state.  More... | |
| void | play_force_init (Play *play, const char *string) | 
| Initialize a forced line.  More... | |
| void | play_force_update (Play *play) | 
| Update a forced line.  More... | |
| void | play_force_restore (Play *play) | 
| Restore a forced line.  More... | |
| bool | play_force_go (Play *play, Move *move) | 
| Play a forced move.  More... | |
| void | play_symetry (Play *play, const int sym) | 
| Get the symetry of the actual position.  More... | |
| const char * | play_show_opening_name (Play *play, const char *(*opening_get_name)(const Board *)) | 
| Print the opening name.  More... | |
Edax play control.
| void play_adjust_time | ( | Play * | play, | 
| const int | left, | ||
| const int | extra | ||
| ) | 
adjust time.
Set remaining time to play from a server (GGS) or a GUI (Quarry, ...).
| play | Play. | 
| left | Time left. | 
| extra | Extra time. | 
      
  | 
  static | 
Seek for the best alternative move.
| play | Play. | 
| played | Last played move. | 
| alternative | Second best move. | 
| depth | Depth searched. | 
| percent | Probcut selectivity searched. | 
| void play_analyze | ( | Play * | play, | 
| int | n | ||
| ) | 
Analyze a played game.
| play | Play. | 
| n | number of moves to analyze. | 
Seek for the best alternative move from the opening book.
| play | Play. | 
| played | Last played move. | 
| alternative | Second best move. | 
| void play_book_analyze | ( | Play * | play, | 
| int | n | ||
| ) | 
Analyze a played game.
| play | Play. | 
| n | number of moves to analyze. | 
| void play_force_init | ( | Play * | play, | 
| const char * | string | ||
| ) | 
Initialize a forced line.
| play | Play. | 
| string | A string with a sequence of moves. | 
| void play_force_restore | ( | Play * | play | ) | 
Restore a forced line.
Check if the actual board is in the forced line, and restore the forced line accordingly.
| play | Play. | 
| void play_force_update | ( | Play * | play | ) | 
Update a forced line.
Check if the actual board is in the forced line, and update the forced line accordingly.
| play | Play. | 
| void play_game | ( | Play * | play, | 
| const char * | string | ||
| ) | 
get book move for libEdax
| play | Play | 
| book_moves | result(out parameter) | 
get book move for libEdax
| play | Play | 
| book_moves | result(out parameter) | 
| position | position(out parameter) | 
| void play_go | ( | Play * | play, | 
| const bool | update | ||
| ) | 
Start thinking.
| play | Play. | 
| update | Flag to tell if edax should update or no its game. | 
| void play_hint | ( | Play * | play, | 
| int | n | ||
| ) | 
Start thinking.
Evaluate first best moves of the position.
| play | Play. | 
| n | Number of (best) moves to evaluate. | 
hint for libEdax
Evaluate first best moves of the position.
| play | Play. | 
| n | Number of (best) moves to evaluate. | 
| hintlist | result (out parameter) | 
get next hint
Evaluate first best moves of the position among rest moves.
| play | Play. | 
| hint | result (out parameter) | 
prepare hint for libEdax
| play | Play. | 
| bool play_is_game_over | ( | Play * | play | ) | 
| bool play_load | ( | Play * | play, | 
| const char * | file | ||
| ) | 
Load a saved game.
| play | Play. | 
| file | File name of the game. | 
| bool play_move | ( | Play * | play, | 
| int | x | ||
| ) | 
| bool play_must_pass | ( | Play * | play | ) | 
| void play_ponder | ( | Play * | play | ) | 
Ponder.
Think during opponent time. Activate the thread suspended in play_ponder_loop.
| play | Play. | 
| void * play_ponder_run | ( | void * | v | ) | 
do ponderation.
Ponderation (thinking during opponent time) is done within a thread. The thread is launched at startup and immediately suspended, thanks to condition_wait. When edax is required to ponder, the thread is activated by a condition_signal, and the search start. To stop the ponderation, just stop the search and wait for the lock to be release.
| v | the play. | 
| void play_print | ( | Play * | play, | 
| FILE * | f | ||
| ) | 
Print the game state.
Print the game state: board, time, played move, etc.
| play | Play. | 
| f | Output stream. | 
| void play_save | ( | Play * | play, | 
| const char * | file | ||
| ) | 
Save a played game.
| play | Play. | 
| file | File name of the game. | 
| void play_set_board | ( | Play * | play, | 
| const char * | board | ||
| ) | 
Set a new board.
| play | Play. | 
| board | A new board. | 
| void play_set_board_from_FEN | ( | Play * | play, | 
| const char * | board | ||
| ) | 
Set a new board.
| play | Play. | 
| board | A new board. | 
| const char * play_show_opening_name | ( | Play * | play, | 
| const char *(*)(const Board *) | opening_get_name | ||
| ) | 
Print the opening name.
| void play_stop_pondering | ( | Play * | play | ) | 
Stop pondering.
If edax is pondering, stop the search, and wait that the pondering thread is suspended.
| play | Play. | 
| void play_symetry | ( | Play * | play, | 
| const int | sym | ||
| ) | 
Get the symetry of the actual position.
| play | Play. | 
| sym | Symetry. | 
| bool play_user_move | ( | Play * | play, | 
| const char * | string | ||
| ) |