User interface header. More...
#include "board.h"
#include "book.h"
#include "event.h"
#include "search.h"
#include "move.h"
#include "play.h"
Go to the source code of this file.
Classes | |
struct | UI |
Macros | |
#define | DLL_API |
Typedefs | |
typedef struct UI | UI |
Functions | |
bool | ui_switch (UI *, const char *) |
Switch between different User Interface. More... | |
void | ui_event_init (UI *) |
Create a new Othello User Interface. More... | |
bool | ui_event_peek (UI *, char **, char **) |
Wait input. More... | |
void | ui_event_wait (UI *, char **, char **) |
Wait input. More... | |
bool | ui_event_exist (UI *) |
ui_event_exist More... | |
void | ui_event_free (UI *) |
Free events. More... | |
void | ui_init_edax (UI *) |
initialize edax protocol. More... | |
void | ui_loop_edax (UI *) |
Loop event. More... | |
void | ui_free_edax (UI *) |
free resources used by edax protocol. More... | |
void | ui_init_gtp (UI *) |
initialize edax protocol More... | |
void | ui_loop_gtp (UI *) |
Loop event. More... | |
void | ui_free_gtp (UI *) |
free resources used by edax protocol More... | |
void | ui_init_nboard (UI *) |
initialize edax protocol More... | |
void | ui_loop_nboard (UI *) |
Loop event. More... | |
void | ui_free_nboard (UI *) |
free resources used by edax protocol More... | |
void | ui_init_xboard (UI *) |
initialize xboard protocol. More... | |
void | ui_loop_xboard (UI *) |
Loop event. More... | |
void | ui_free_xboard (UI *) |
free resources used by xboard protocol. More... | |
void | ui_init_ggs (UI *) |
ui_init_ggs More... | |
void | ui_loop_ggs (UI *) |
ui_loop_ggs More... | |
void | ui_free_ggs (UI *) |
ui_free_ggs More... | |
void | ui_init_cassio (UI *) |
void | ui_loop_cassio (UI *) |
void | ui_free_cassio (UI *) |
void | ui_book_init (UI *) |
DLL_API void | libedax_initialize (int, char **) |
edax init function for library use. More... | |
DLL_API void | libedax_terminate () |
edax terminate function for library use. More... | |
DLL_API void | edax_init () |
init command. More... | |
DLL_API void | edax_new () |
new command. More... | |
DLL_API void | edax_load (const char *) |
load command. More... | |
DLL_API void | edax_save (const char *) |
save command. More... | |
DLL_API void | edax_undo () |
undo command. More... | |
DLL_API void | edax_redo () |
redo command. More... | |
DLL_API void | edax_mode (const int) |
mode command. More... | |
DLL_API void | edax_setboard (const char *) |
setboard command. More... | |
DLL_API void | edax_setboard_from_obj (const Board *, const int) |
setboard command with board object. More... | |
DLL_API void | edax_vmirror () |
vmirror command. More... | |
DLL_API void | edax_hmirror () |
hmirror command. More... | |
DLL_API void | edax_rotate (const int) |
rotate command. More... | |
DLL_API void | edax_symetry (const int) |
symetry command. More... | |
DLL_API void | edax_play (char *) |
play command. More... | |
DLL_API void | edax_force (char *) |
force command. More... | |
DLL_API void | edax_go () |
go command. More... | |
DLL_API void | edax_hint (const int, HintList *) |
hint command. More... | |
DLL_API void | edax_hint_prepare () |
hint command. Call edax_hint_next after calling this function. More... | |
DLL_API void | edax_hint_next (Hint *) |
hint command. Gets hint one by one. If there are no more hints, hint will be NOMOVE. Call edax_hint_prepare before calling this function. More... | |
DLL_API void | edax_stop () |
stop command. More... | |
DLL_API int | edax_move (const char *) |
user move command. More... | |
DLL_API const char * | edax_opening () |
opening command. More... | |
DLL_API const char * | edax_ouverture () |
ouverture command. More... | |
DLL_API void | edax_book_store () |
book store command. More... | |
DLL_API void | edax_book_on () |
book on command. More... | |
DLL_API void | edax_book_off () |
book off command. More... | |
DLL_API void | edax_book_randomness (const int) |
book randomness command. More... | |
DLL_API void | edax_book_depth (const int) |
book depth command. More... | |
DLL_API void | edax_book_new (const int, const int) |
book new command. More... | |
DLL_API void | edax_book_load (const char *) |
book load command. More... | |
DLL_API void | edax_book_save (const char *) |
book save command. More... | |
DLL_API void | edax_book_import (const char *) |
book import command. More... | |
DLL_API void | edax_book_export (const char *) |
book export command. More... | |
DLL_API void | edax_book_merge (const char *) |
book merge command. More... | |
DLL_API void | edax_book_fix () |
book fix command. More... | |
DLL_API void | edax_book_negamax () |
book negamax command. More... | |
DLL_API void | edax_book_correct () |
book correct command. More... | |
DLL_API void | edax_book_prune () |
book prune command. More... | |
DLL_API void | edax_book_subtree () |
book subtree command. More... | |
DLL_API void | edax_book_show (Position *) |
book show command. More... | |
DLL_API void | edax_book_info (Book *) |
book info command. More... | |
DLL_API void | edax_book_verbose (const int) |
book verbose command. More... | |
DLL_API void | edax_book_add (const char *) |
book add command. More... | |
DLL_API void | edax_book_check (const char *) |
book check command. More... | |
DLL_API void | edax_book_extract (const char *) |
book extract command. More... | |
DLL_API void | edax_book_deviate (int, int) |
book deviate command. More... | |
DLL_API void | edax_book_enhance (int, int) |
book enhance command. More... | |
DLL_API void | edax_book_fill (int) |
book fill command. More... | |
DLL_API void | edax_book_play () |
book play command. More... | |
DLL_API void | edax_book_deepen () |
book deepen command. caution: Currently, this function does not work correctly. More... | |
DLL_API void | edax_book_feed_hash () |
book feed-hash command. More... | |
DLL_API void | edax_base_problem (const char *, const int, const char *) |
base problem command. More... | |
DLL_API void | edax_base_tofen (const char *, const int, const char *) |
base tofen command. More... | |
DLL_API void | edax_base_correct (const char *, const int) |
base correct command. More... | |
DLL_API void | edax_base_complete (const char *) |
base complete command. More... | |
DLL_API void | edax_base_convert (const char *, const char *) |
base convert command. More... | |
DLL_API void | edax_base_unique (const char *, const char *) |
base unique command. More... | |
DLL_API void | edax_set_option (const char *, const char *) |
set (option) command. More... | |
DLL_API char * | edax_get_moves (char *) |
get moves of the current game. More... | |
DLL_API int | edax_is_game_over () |
check if the current game is over. More... | |
DLL_API int | edax_can_move () |
check if the current player can move. More... | |
DLL_API void | edax_get_last_move (Move *) |
get last move. More... | |
DLL_API void | edax_get_board (Board *) |
get current board. More... | |
DLL_API int | edax_get_current_player () |
get current player. More... | |
DLL_API int | edax_get_disc (const int) |
get current number of discs. More... | |
DLL_API int | edax_get_mobility_count (const int) |
get current number of legal moves. More... | |
static void | libedax_observer (Result *) |
void | ui_init_libedax (UI *) |
initialize libedax api. More... | |
void | ui_free_libedax (UI *) |
free resources used by libedax api. More... | |
void | auto_go () |
auto go with regard to mode. More... | |
void | book_cmd_pre_process (UI *) |
pre-process of book command. More... | |
void | book_cmd_post_process (UI *) |
post-process of book command. More... | |
User interface header.
#define DLL_API |
void auto_go | ( | ) |
auto go with regard to mode.
void book_cmd_post_process | ( | UI * | ui | ) |
post-process of book command.
ui | user interface. |
void book_cmd_pre_process | ( | UI * | ui | ) |
pre-process of book command.
ui | user interface. |
DLL_API void edax_base_complete | ( | const char * | base_file | ) |
base complete command.
base_file | game database file. |
DLL_API void edax_base_convert | ( | const char * | base_file_from, |
const char * | base_file_to | ||
) |
base convert command.
base_file_from | input game database file. |
base_file_to | output game database file. |
DLL_API void edax_base_correct | ( | const char * | base_file, |
const int | n_empties | ||
) |
base correct command.
base_file | game database file. |
n_empties | number of empties. |
DLL_API void edax_base_problem | ( | const char * | base_file, |
const int | n_empties, | ||
const char * | problem_file | ||
) |
base problem command.
base_file | game database file. |
n_empties | number of empties. |
problem_file | problem_file to save. |
DLL_API void edax_base_tofen | ( | const char * | base_file, |
const int | n_empties, | ||
const char * | problem_file | ||
) |
base tofen command.
base_file | game database file. |
n_empties | number of empties. |
problem_file | problem_file to save. |
DLL_API void edax_base_unique | ( | const char * | base_file_from, |
const char * | base_file_to | ||
) |
base unique command.
base_file_from | input game database file. |
base_file_to | output game database file. |
DLL_API void edax_book_add | ( | const char * | base_file | ) |
book add command.
base_file | base file to add. |
DLL_API void edax_book_check | ( | const char * | base_file | ) |
book check command.
base_file | base file to check. |
DLL_API void edax_book_correct | ( | ) |
book correct command.
DLL_API void edax_book_deepen | ( | ) |
book deepen command. caution: Currently, this function does not work correctly.
DLL_API void edax_book_depth | ( | const int | depth | ) |
book depth command.
depth | depth. |
DLL_API void edax_book_deviate | ( | int | relative_error, |
int | absolute_error | ||
) |
book deviate command.
relative_error | relative error. |
absolute_error | absolute error. |
DLL_API void edax_book_enhance | ( | int | midgame_error, |
int | endcut_error | ||
) |
book enhance command.
midgame_error | midgame error. |
endcut_error | endcut error. |
DLL_API void edax_book_export | ( | const char * | export_file | ) |
book export command.
export_file | file name to export. |
DLL_API void edax_book_extract | ( | const char * | base_file | ) |
book extract command.
base_file | base file to extract. |
DLL_API void edax_book_feed_hash | ( | ) |
book feed-hash command.
DLL_API void edax_book_fill | ( | int | fill_depth | ) |
book fill command.
fill_depth | fill depth. |
DLL_API void edax_book_fix | ( | ) |
book fix command.
DLL_API void edax_book_import | ( | const char * | import_file | ) |
book import command.
import_file | file name to import. |
book info command.
book | book information(out parameter). |
DLL_API void edax_book_load | ( | const char * | book_file | ) |
book load command.
book_file | book file name to load. |
DLL_API void edax_book_merge | ( | const char * | book_file | ) |
book merge command.
book_file | file name to merge. |
DLL_API void edax_book_negamax | ( | ) |
book negamax command.
DLL_API void edax_book_new | ( | const int | level, |
const int | depth | ||
) |
book new command.
level | level. |
depth | depth. |
DLL_API void edax_book_off | ( | ) |
book off command.
DLL_API void edax_book_on | ( | ) |
book on command.
DLL_API void edax_book_play | ( | ) |
book play command.
DLL_API void edax_book_prune | ( | ) |
book prune command.
DLL_API void edax_book_randomness | ( | const int | randomness | ) |
book randomness command.
randomness | randomness. |
DLL_API void edax_book_save | ( | const char * | book_file | ) |
book save command.
book_file | book file name to save. |
book show command.
position | position information(out parameter). |
DLL_API void edax_book_store | ( | ) |
book store command.
DLL_API void edax_book_subtree | ( | ) |
book subtree command.
DLL_API void edax_book_verbose | ( | const int | book_verbosity | ) |
book verbose command.
book_verbosity | book verbosity. |
DLL_API int edax_can_move | ( | ) |
check if the current player can move.
DLL_API void edax_force | ( | char * | moves | ) |
force command.
moves | moves. |
get current board.
board | current board(out parameter). |
DLL_API int edax_get_current_player | ( | ) |
get current player.
DLL_API int edax_get_disc | ( | const int | color | ) |
get current number of discs.
color | player's color(0:BLACK, 1:WHITE). |
get last move.
move | last move(out parameter). |
DLL_API int edax_get_mobility_count | ( | const int | color | ) |
get current number of legal moves.
color | player's color(0:BLACK, 1:WHITE). |
DLL_API char* edax_get_moves | ( | char * | str | ) |
get moves of the current game.
str | buffer of length 160 + 1 or more (out parameter). |
DLL_API void edax_go | ( | ) |
go command.
hint command.
n | number of hints. |
hintlist | result (out parameter). |
hint command. Gets hint one by one. If there are no more hints, hint will be NOMOVE. Call edax_hint_prepare before calling this function.
n | number of hints. |
hintlist | result (out parameter). |
DLL_API void edax_hint_prepare | ( | ) |
hint command. Call edax_hint_next after calling this function.
DLL_API void edax_hmirror | ( | ) |
hmirror command.
DLL_API void edax_init | ( | ) |
init command.
DLL_API int edax_is_game_over | ( | ) |
check if the current game is over.
DLL_API void edax_load | ( | const char * | file | ) |
load command.
file | file name to open |
DLL_API void edax_mode | ( | const int | mode | ) |
mode command.
mode | mode to set |
DLL_API int edax_move | ( | const char * | move | ) |
user move command.
move | user move. |
DLL_API void edax_new | ( | ) |
new command.
DLL_API const char* edax_opening | ( | ) |
opening command.
DLL_API const char* edax_ouverture | ( | ) |
ouverture command.
DLL_API void edax_play | ( | char * | moves | ) |
play command.
moves | moves. |
DLL_API void edax_redo | ( | ) |
redo command.
DLL_API void edax_rotate | ( | const int | angle | ) |
rotate command.
angle | angle for rotation |
DLL_API void edax_save | ( | const char * | file | ) |
save command.
file | file name to save |
DLL_API void edax_set_option | ( | const char * | option_name, |
const char * | val | ||
) |
set (option) command.
option_name | name of option. |
val | value to set. |
DLL_API void edax_setboard | ( | const char * | board | ) |
setboard command.
board | board to set |
setboard command with board object.
board | board to set |
turn | player to play |
DLL_API void edax_stop | ( | ) |
stop command.
DLL_API void edax_symetry | ( | const int | sym | ) |
symetry command.
sym | symetry. |
DLL_API void edax_undo | ( | ) |
undo command.
DLL_API void edax_vmirror | ( | ) |
vmirror command.
DLL_API void libedax_initialize | ( | int | argc, |
char ** | argv | ||
) |
edax init function for library use.
argc | Number of arguments. |
argv | Command line arguments. |
|
static |
DLL_API void libedax_terminate | ( | ) |
edax terminate function for library use.
void ui_book_init | ( | UI * | ) |
bool ui_event_exist | ( | UI * | ui | ) |
ui_event_exist
Locked version of event_exist.
ui | User interface. |
void ui_event_free | ( | UI * | ui | ) |
Free events.
Allocate event resources & launch user-input event thread.
void ui_event_init | ( | UI * | ui | ) |
Create a new Othello User Interface.
Allocate event resources & launch user-input event thread.
bool ui_event_peek | ( | UI * | ui, |
char ** | cmd, | ||
char ** | param | ||
) |
Wait input.
ui | User interface. |
cmd | Command. |
param | Command's parameters. |
void ui_event_wait | ( | UI * | ui, |
char ** | cmd, | ||
char ** | param | ||
) |
Wait input.
ui | User interface. |
cmd | Command. |
param | Command's parameters. |
void ui_free_cassio | ( | UI * | ) |
void ui_free_edax | ( | UI * | ui | ) |
free resources used by edax protocol.
ui | user interface. |
void ui_free_ggs | ( | UI * | ui | ) |
ui_free_ggs
Free GGS.
ui | User Interface. |
void ui_free_gtp | ( | UI * | ui | ) |
free resources used by edax protocol
ui | user interface |
void ui_free_libedax | ( | UI * | ui | ) |
free resources used by libedax api.
ui | user interface. |
void ui_free_nboard | ( | UI * | ui | ) |
free resources used by edax protocol
ui | user interface |
void ui_free_xboard | ( | UI * | ui | ) |
free resources used by xboard protocol.
ui | user interface. |
void ui_init_cassio | ( | UI * | ) |
void ui_init_edax | ( | UI * | ui | ) |
initialize edax protocol.
ui | user interface. |
void ui_init_ggs | ( | UI * | ui | ) |
ui_init_ggs
Init GGS interface.
ui | User Interface. |
void ui_init_gtp | ( | UI * | ui | ) |
initialize edax protocol
ui | user interface |
void ui_init_libedax | ( | UI * | ui | ) |
initialize libedax api.
ui | user interface. |
void ui_init_nboard | ( | UI * | ui | ) |
initialize edax protocol
ui | user interface |
void ui_init_xboard | ( | UI * | ui | ) |
initialize xboard protocol.
ui | user interface. |
void ui_loop_cassio | ( | UI * | ) |
void ui_loop_edax | ( | UI * | ui | ) |
Loop event.
ui | user interface. |
void ui_loop_ggs | ( | UI * | ui | ) |
ui_loop_ggs
GGS main loop. Here the input from both the user and GGS server is interpreted.
ui | User Interface. |
void ui_loop_gtp | ( | UI * | ui | ) |
Loop event.
ui | user interface |
void ui_loop_nboard | ( | UI * | ui | ) |
Loop event.
ui | user interface |
void ui_loop_xboard | ( | UI * | ui | ) |
Loop event.
ui | user interface. |
bool ui_switch | ( | UI * | ui, |
const char * | ui_type | ||
) |
Switch between different User Interface.
ui | User Interface. |
ui_type | A string describing the chosen user interface. |