This is the doxygen documentation for gtkboard.

.
Main Page   Data Structures   File List   Data Fields   Globals  

ui.c File Reference

#include <time.h>
#include <assert.h>
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
#include <signal.h>
#include <ctype.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <glib.h>
#include <gmodule.h>
#include <gtk/gtk.h>
#include <gdk/gdk.h>
#include "config.h"
#include "ui.h"
#include "prefs.h"
#include "move.h"
#include "menu.h"
#include "ui_common.h"
#include "board.h"

Go to the source code of this file.

Defines

#define DEF_TIME_PER_MOVE   2000
 Default thinking time per move.


Functions

void engine_main (int, int)
 This is the main function for the engine.

ResultType engine_eval (Pos *, Player, float *)
gboolean impl_check ()
void ui_check_who_won ()
void game_set_init_pos_def (Pos *)
int ui_get_machine_move ()
void ui_make_human_move (byte *, int *)
void set_game_params ()
 game specific initialization.

void ignore ()
void ui_cleanup ()
void ui_segv_cleanup ()
void ui_child_cleanup ()
int ui_animate_cb ()
void reset_game_params ()
void ui_terminate_game ()
void ui_start_game ()
void ui_send_make_move ()
int ui_move_now_cb ()
void ui_cancel_move ()
void ui_start_player ()
void parse_opts (int argc, char **argv)
void gui_init ()
int main (int argc, char **argv)

Variables

Game Othello
Game Samegame
Game Rgb
Game Fifteen
Game Memory
Game Tetris
Game Chess
Game Antichess
Game Hiq
Game Checkers
Game Plot4
Game Maze
Game Infiltrate
Game Hypermaze
Game Ataxx
Game Pentaline
Game Mastermind
Game Pacman
Game Flw
Game Wordtris
Game Ninemm
Game Stopgate
Game Knights
Game Breakthrough
Game CapturePento
Game Towers
Game Quarto
Game Kttour
Game Eightqueens
Game Dnb
Game Blet
Gamegames []
const int num_games = sizeof (games) / sizeof (games[0])
gboolean engine_flag = FALSE
FILE* move_fin
FILE * move_fout
GIOChannel* ui_in = NULL
Pos cur_pos = {NULL, NULL, WHITE, NULL, 0, NULL}
int board_wid
int board_heit
int engine_pid = -1
gint animate_tag = -1
gboolean game_allow_undo = FALSE
 Is the user allowed to undo move and still get on the highscores (only for single player games; default: FALSE).

gboolean game_single_player = FALSE
 Are we a single player game or a two-player game? DEFAULT: FALSE.

gboolean game_animation_use_movstack = TRUE
 Whether or not to consider animations "moves". Default: TRUE.

gboolean game_allow_back_forw = TRUE
 Should we allow the user to move back and forward in the game. Default: TRUE. More...

int game_animation_time = 0
 Determines how frequently to call the game's animation callback function (game_animate). Default: 0.

gchar* game_doc_about = NULL
 The text to be shown in the About dialog for the game (Help->GameName->About).

gchar* game_doc_rules = NULL
 The text to be shown in the Rules dialog for the game (Help->GameName->Rules).

gchar* game_doc_strategy = NULL
 The text to be shown in the Strategy dialog for the game (Help->GameName->Strategy).

gchar* game_white_string = "White"
 User visible labels for white and black.

gchar * game_black_string = "Black"
 User visible labels for white and black.

gboolean ui_gameover = FALSE
gboolean ui_stopped = TRUE
gboolean ui_cheated = FALSE
gboolean game_stateful = FALSE
 Are we a stateful game. Default: FALSE.

gboolean state_gui_active = FALSE
gboolean game_draw_cell_boundaries = FALSE
 Should the lines between the rows and columns be drawn. Default: FALSE. More...

gboolean game_start_immediately = FALSE
 Should the user's clock start ticking as soon as the game is selected. Default: FALSE. More...

gboolean game_allow_flip = FALSE
 (Only for two player games) Is Settings->Flip Board active. For single player games it is always inactive.

gboolean game_file_label = 0
gboolean game_rank_label = 0
char* game_highlight_colors = NULL
 Colors to use for highlighting squares.

char game_highlight_colors_def [9] = {0xff, 0xff, 0, 0, 0, 0, 0, 0, 0}
HeurTabgame_htab = NULL
 Array of structs representing evaluation functions.

int game_state_size = 0
 Size of the Pos::state structure. More...

SCORE_FIELDgame_score_fields = prefs_score_fields_def
 Used to override the default highscore columns. More...

gchar** game_score_field_names = prefs_score_field_names_def
 The names of the column titles in the highscores. More...

char** game_bg_pixmap = NULL
 Background image for the board.

Gameopt_game = NULL
FILE* opt_infile = NULL
FILE* opt_logfile = NULL
int opt_delay = DEF_TIME_PER_MOVE
int opt_quiet = 0
int opt_white = NONE
int opt_black = NONE
int ui_white = NONE
int ui_black = NONE
int opt_verbose = 0
ResultType (* game_eval )(Pos *, Player, float *)=NULL
 A pointer to the game's evaluation function. More...

ResultType (* game_eval_incr )(Pos *, Player, byte *, float *)=NULL
 A pointer to the game's incremental evaluation function. More...

gboolean (* game_use_incr_eval )(Pos *, Player)=NULL
 Should we use the incr eval function.

float (* game_eval_white )(Pos *, int)=NULL
float (* game_eval_black )(Pos *, int)=NULL
void (* game_search )(Pos *, byte **)=NULL
 A function to search and return the best move - for games for which minimax is not appropriate.

byte* (* game_movegen )(Pos *)=NULL
 A pointer to the game's move generation function. More...

InputType (* game_event_handler )(Pos *, GtkboardEvent *, MoveInfo *)=NULL
 The all-in-one function that makes game_getmove and game_getmove_kb deprecated.

int (* game_getmove )(Pos *, int, int, GtkboardEventType, Player, byte **, int **)=NULL
 This takes a mouse click and returns the move that it corresponds to. More...

int (* game_getmove_kb )(Pos *, int, Player, byte **, int **)=NULL
 Takes a keypress and returns the move that it corresponds to. More...

ResultType (* game_who_won )(Pos *, Player, char **)=NULL
 Checks if the game is over, and if so, who has won. More...

int (* game_animate )(Pos *, byte **)=NULL
 Pointer to animation callback which will be called periodically.

char** ( * game_get_pixmap )(int, int)=NULL
 Returns the pixmap for a piece. More...

guchar* ( * game_get_rgbmap )(int, int)=NULL
 Same as game_get_pixmap but returns a rgbmap instead of pixmap.

void (* game_free )()=NULL
 Called at the end of every game.

void* (* game_newstate )(Pos *, byte *)=NULL
 Pointer to function which will compute the new state from the current position and the move. More...

void (* game_set_init_pos )(Pos *)=game_set_init_pos_def
 Pointer to function which sets the game's initial position. More...

void (* game_set_init_render )(Pos *)=NULL
 Sets the initial state of the rendering hints.

void (* game_get_render )(Pos *, byte *, int **)=NULL
 The rendering hints associated with the move.

void (* game_reset_uistate )()=NULL
 This is called after each move the user completes. More...

int (* game_scorecmp )(gchar *, int, gchar *, int)=NULL
int (* game_scorecmp_def_dscore )(gchar *, int, gchar *, int)=prefs_scorecmp_dscore
 Default highscore comparison function: decreasing order of Score field.

int (* game_scorecmp_def_iscore )(gchar *, int, gchar *, int)=prefs_scorecmp_iscore
 Default highscore comparison function: increasing order of Score field.

int (* game_scorecmp_def_time )(gchar *, int, gchar *, int)=prefs_scorecmp_time
 Default highscore comparison function: increasing order of Time field.

GtkWidget* main_window
 The main application window.

GtkWidget * board_area = NULL
GtkWidget* board_rowbox = NULL
GtkWidget * board_colbox = NULL


Define Documentation

#define DEF_TIME_PER_MOVE   2000
 

Default thinking time per move.

Definition at line 47 of file ui.c.


Function Documentation

ResultType engine_eval ( Pos *,
Player,
float * )
 

void engine_main ( int infd,
int outfd )
 

This is the main function for the engine.

Definition at line 379 of file engine.c.

Referenced by ui_start_player().

void game_set_init_pos_def ( Pos * pos )
 

Definition at line 223 of file ui.c.

void gui_init ( )
 

Definition at line 803 of file ui.c.

Referenced by main().

void ignore ( ) [static]
 

Definition at line 171 of file ui.c.

gboolean impl_check ( )
 

Definition at line 553 of file ui.c.

Referenced by board_signal_handler(), and menu_start_stop_game().

int main ( int argc,
char ** argv )
 

Definition at line 1042 of file ui.c.

void parse_opts ( int argc,
char ** argv ) [static]
 

Definition at line 570 of file ui.c.

Referenced by main().

void reset_game_params ( )
 

Definition at line 236 of file ui.c.

void set_game_params ( )
 

game specific initialization.

Definition at line 354 of file ui.c.

int ui_animate_cb ( )
 

Definition at line 206 of file ui.c.

void ui_cancel_move ( )
 

Definition at line 520 of file ui.c.

Referenced by menu_start_stop_game().

void ui_check_who_won ( )
 

Definition at line 397 of file ui.c.

Referenced by menu_back_forw(), ui_get_machine_move(), ui_make_human_move(), and ui_start_game().

void ui_child_cleanup ( )
 

Definition at line 195 of file ui.c.

void ui_cleanup ( )
 

Definition at line 173 of file ui.c.

Referenced by ui_check_who_won().

int ui_get_machine_move ( )
 

Definition at line 475 of file ui.c.

Referenced by ui_move_now_cb().

void ui_make_human_move ( byte * move,
int * rmove )
 

Definition at line 454 of file ui.c.

Referenced by board_signal_handler(), and ui_animate_cb().

int ui_move_now_cb ( )
 

Definition at line 510 of file ui.c.

void ui_segv_cleanup ( )
 

Definition at line 185 of file ui.c.

void ui_send_make_move ( )
 

Definition at line 435 of file ui.c.

Referenced by main(), menu_start_stop_game(), ui_get_machine_move(), and ui_make_human_move().

void ui_start_game ( )
 

Definition at line 317 of file ui.c.

Referenced by menu_start_game(), and menu_start_stop_game().

void ui_start_player ( )
 

Definition at line 531 of file ui.c.

Referenced by main().

void ui_terminate_game ( )
 

Definition at line 293 of file ui.c.

Referenced by menu_set_game(), menu_start_stop_game(), and ui_cleanup().


Variable Documentation

Game Antichess
 

Definition at line 50 of file ui.c.

Game Ataxx
 

Definition at line 50 of file ui.c.

Game Blet
 

Definition at line 50 of file ui.c.

Game Breakthrough
 

Definition at line 50 of file ui.c.

Game CapturePento
 

Definition at line 50 of file ui.c.

Game Checkers
 

Definition at line 50 of file ui.c.

Game Chess
 

Definition at line 50 of file ui.c.

Game Dnb
 

Definition at line 50 of file ui.c.

Game Eightqueens
 

Definition at line 50 of file ui.c.

Game Fifteen
 

Definition at line 50 of file ui.c.

Game Flw
 

Definition at line 50 of file ui.c.

Game Hiq
 

Definition at line 50 of file ui.c.

Game Hypermaze
 

Definition at line 50 of file ui.c.

Game Infiltrate
 

Definition at line 50 of file ui.c.

Game Knights
 

Definition at line 50 of file ui.c.

Game Kttour
 

Definition at line 50 of file ui.c.

Game Mastermind
 

Definition at line 50 of file ui.c.

Game Maze
 

Definition at line 50 of file ui.c.

Game Memory
 

Definition at line 50 of file ui.c.

Game Ninemm
 

Definition at line 50 of file ui.c.

Game Othello
 

Definition at line 50 of file ui.c.

Game Pacman
 

Definition at line 50 of file ui.c.

Game Pentaline
 

Definition at line 50 of file ui.c.

Game Plot4
 

Definition at line 50 of file ui.c.

Game Quarto
 

Definition at line 50 of file ui.c.

Game Rgb
 

Definition at line 50 of file ui.c.

Game Samegame
 

Definition at line 50 of file ui.c.

Game Stopgate
 

Definition at line 50 of file ui.c.

Game Tetris
 

Definition at line 50 of file ui.c.

Game Towers
 

Definition at line 50 of file ui.c.

Game Wordtris
 

Definition at line 50 of file ui.c.

gint animate_tag = -1 [static]
 

Definition at line 83 of file ui.c.

GtkWidget * board_area = NULL
 

Definition at line 168 of file ui.c.

GtkWidget * board_colbox = NULL
 

Definition at line 169 of file ui.c.

int board_heit
 

Definition at line 79 of file ui.c.

GtkWidget* board_rowbox = NULL
 

Definition at line 169 of file ui.c.

int board_wid
 

Definition at line 79 of file ui.c.

Pos cur_pos = {NULL, NULL, WHITE, NULL, 0, NULL}
 

Definition at line 77 of file ui.c.

gboolean engine_flag = FALSE
 

Definition at line 70 of file ui.c.

int engine_pid = -1 [static]
 

Definition at line 81 of file ui.c.

gboolean game_allow_back_forw = TRUE
 

Should we allow the user to move back and forward in the game. Default: TRUE.

You should not set this to FALSE unless you have a compelling reason to do so. Don't worry about the user cheating and getting a highscore that they don't deserve -- if the user ever clicks back, highscores will be disabled for that game :-) Currently only tetris (tetris.c) sets this to FALSE, because of some complex client-server related issues.

Definition at line 91 of file ui.c.

gboolean game_allow_flip = FALSE
 

(Only for two player games) Is Settings->Flip Board active. For single player games it is always inactive.

Definition at line 107 of file ui.c.

gboolean game_allow_undo = FALSE
 

Is the user allowed to undo move and still get on the highscores (only for single player games; default: FALSE).

Definition at line 87 of file ui.c.

int (* game_animate)(Pos *, byte **) = NULL
 

Pointer to animation callback which will be called periodically.

Definition at line 154 of file ui.c.

Referenced by ui_animate_cb().

int game_animation_time = 0
 

Determines how frequently to call the game's animation callback function (game_animate). Default: 0.

Definition at line 92 of file ui.c.

gboolean game_animation_use_movstack = TRUE
 

Whether or not to consider animations "moves". Default: TRUE.

Definition at line 90 of file ui.c.

char** game_bg_pixmap = NULL
 

Background image for the board.

Definition at line 119 of file ui.c.

gchar * game_black_string = "Black"
 

User visible labels for white and black.

Definition at line 98 of file ui.c.

gchar* game_doc_about = NULL
 

The text to be shown in the About dialog for the game (Help->GameName->About).

Definition at line 94 of file ui.c.

gchar* game_doc_rules = NULL
 

The text to be shown in the Rules dialog for the game (Help->GameName->Rules).

Definition at line 95 of file ui.c.

gchar* game_doc_strategy = NULL
 

The text to be shown in the Strategy dialog for the game (Help->GameName->Strategy).

Definition at line 96 of file ui.c.

gboolean game_draw_cell_boundaries = FALSE
 

Should the lines between the rows and columns be drawn. Default: FALSE.

Example of game which draws boundaries: pentaline (pentaline.c) Example of game which doesn't draw boundaries: memory (memory.c)

Definition at line 105 of file ui.c.

ResultType (* game_eval)(Pos *, Player, float *) = NULL
 

A pointer to the game's evaluation function.

Only for two player games. It must be implemented if you want the computer to be able to play the game.

Definition at line 143 of file ui.c.

Referenced by ab_with_tt(), and ab_with_tt_incr().

float (* game_eval_black)(Pos *, int) = NULL
 

Definition at line 147 of file ui.c.

Referenced by engine_eval().

ResultType (* game_eval_incr)(Pos *, Player, byte *, float *) = NULL
 

A pointer to the game's incremental evaluation function.

Only for two player games. This is an advanced feature: if you feel that being forced to look at the whole board for each call to game_eval is inefficient, you can write an incremental evaluation function which takes a position and the move being made and returns the difference in the eval of the original and final positions. Note that you still need to implement game_eval even if you implement this function. Since premature optimization is the root of all evil, it is highly recommended that you get your game working and stable before you think of implementing this function :)

Definition at line 144 of file ui.c.

Referenced by ab_with_tt_incr().

float (* game_eval_white)(Pos *, int) = NULL
 

Definition at line 146 of file ui.c.

Referenced by engine_eval().

InputType (* game_event_handler)(Pos *, GtkboardEvent *, MoveInfo *) = NULL
 

The all-in-one function that makes game_getmove and game_getmove_kb deprecated.

Definition at line 150 of file ui.c.

Referenced by board_signal_handler().

gboolean game_file_label = 0
 

Definition at line 108 of file ui.c.

void (* game_free)() = NULL
 

Called at the end of every game.

Definition at line 157 of file ui.c.

Referenced by reset_game_params().

char** ( * game_get_pixmap)(int, int) = NULL
 

Returns the pixmap for a piece.

In many games, the pixmaps are generated at runtime (see aaball.c). Such games use this function. The second argument color is 0 or 1 depending on whether the piece will be shown on a light square or a dark square. If your pixmap is antialiased you need this.

Definition at line 155 of file ui.c.

void (* game_get_render)(Pos *, byte *, int **) = NULL
 

The rendering hints associated with the move.

Definition at line 161 of file ui.c.

Referenced by board_apply_refresh().

guchar* ( * game_get_rgbmap)(int, int) = NULL
 

Same as game_get_pixmap but returns a rgbmap instead of pixmap.

Definition at line 156 of file ui.c.

Referenced by board_init().

int (* game_getmove)(Pos *, int, int, GtkboardEventType, Player, byte **, int **) = NULL
 

This takes a mouse click and returns the move that it corresponds to.

Parameters:
pos  
x   x coordinate of the square that was clicked
y   y coordinate of the square that was clicked
type   type of event
to_play   whose turn is it
movp   a pointer to store the move in if the move is valid
returns:   >0 if move is valid, 0 if more information is needed, -1 if move is illegal // TODO: there should be an enum for this

pentaline_getmove() is a good example of a minimal getmove function.

Definition at line 151 of file ui.c.

Referenced by board_signal_handler().

int (* game_getmove_kb)(Pos *, int, Player, byte **, int **) = NULL
 

Takes a keypress and returns the move that it corresponds to.

Parameters:
pos  
key   the key that the user pressed
to_play  
movp   a pointer to the move. The game must allocate memory for this (statically).
rmovp   pointer to rendering change

Definition at line 152 of file ui.c.

Referenced by board_signal_handler().

char* game_highlight_colors = NULL
 

Colors to use for highlighting squares.

Definition at line 110 of file ui.c.

char game_highlight_colors_def[9] = {0xff, 0xff, 0, 0, 0, 0, 0, 0, 0}
 

Definition at line 111 of file ui.c.

HeurTab* game_htab = NULL
 

Array of structs representing evaluation functions.

Definition at line 113 of file ui.c.

byte* (* game_movegen)(Pos *) = NULL
 

A pointer to the game's move generation function.

Only for two player games. It must be implemented if you want the computer to be able to play the game.

It returns a list of moves possible in a given position. See move.h for documentation of the MOVLIST format. Plot4's movegen function (plot4_movegen()) is a good example of a simple movegen function.

The move list (array) should be malloc'd inside this function and will be freed by the caller.

Definition at line 149 of file ui.c.

Referenced by ab_dfid(), ab_with_tt(), and ab_with_tt_incr().

void* (* game_newstate)(Pos *, byte *) = NULL
 

Pointer to function which will compute the new state from the current position and the move.

The returned state should be a pointer to a statically declared structure.

Definition at line 158 of file ui.c.

Referenced by ab_with_tt(), ab_with_tt_incr(), engine_make_move(), and engine_take_move().

gboolean game_rank_label = 0
 

Definition at line 108 of file ui.c.

void (* game_reset_uistate)() = NULL
 

This is called after each move the user completes.

The user may have made some clicks which do not complete a move and then clicked the back button, for example. Then the game must forget the saved clicks.

Definition at line 162 of file ui.c.

Referenced by menu_back_forw(), and ui_terminate_game().

gchar** game_score_field_names = prefs_score_field_names_def
 

The names of the column titles in the highscores.

If you set game_score_fields you also have to set game_score_field_names which gives the titles to use for the respective columns.

Definition at line 117 of file ui.c.

SCORE_FIELD* game_score_fields = prefs_score_fields_def
 

Used to override the default highscore columns.

By default, the columns shown in the highscores are User, Score, Time and Date. This sequence can be overridden by specifying a game_score_fields array terminated by SCORE_FIELD_NONE. SCORE_FIELD_MISC1 and SCORE_FIELD_MISC2 are used to specify some field which is none of the 5 available by default. The MISC functionality is currently unimplemented

Definition at line 116 of file ui.c.

int (* game_scorecmp)(gchar *, int, gchar*, int) = NULL
 

Definition at line 163 of file ui.c.

Referenced by prefs_add_highscore().

int (* game_scorecmp_def_dscore)(gchar *, int, gchar*, int) = prefs_scorecmp_dscore
 

Default highscore comparison function: decreasing order of Score field.

Definition at line 164 of file ui.c.

int (* game_scorecmp_def_iscore)(gchar *, int, gchar*, int) = prefs_scorecmp_iscore
 

Default highscore comparison function: increasing order of Score field.

Definition at line 165 of file ui.c.

int (* game_scorecmp_def_time)(gchar *, int, gchar*, int) = prefs_scorecmp_time
 

Default highscore comparison function: increasing order of Time field.

Definition at line 166 of file ui.c.

void (* game_search)(Pos *, byte **) = NULL
 

A function to search and return the best move - for games for which minimax is not appropriate.

Definition at line 148 of file ui.c.

Referenced by engine_search().

void (* game_set_init_pos)(Pos *) = game_set_init_pos_def
 

Pointer to function which sets the game's initial position.

In some games such as maze (maze.c), the initial position is not constant but randomly generated. Such functions use game_set_init_pos. The function is expected to set the value of pos->board.

Definition at line 159 of file ui.c.

Referenced by engine_reset_game(), menu_load_file(), and set_game_params().

void (* game_set_init_render)(Pos *) = NULL
 

Sets the initial state of the rendering hints.

Definition at line 160 of file ui.c.

Referenced by set_game_params().

gboolean game_single_player = FALSE
 

Are we a single player game or a two-player game? DEFAULT: FALSE.

Definition at line 89 of file ui.c.

gboolean game_start_immediately = FALSE
 

Should the user's clock start ticking as soon as the game is selected. Default: FALSE.

Doesn't make a lot of sense for two player games. In games like maze (maze.c), the user can solve the maze without even making a move, so it would be unfair to let them look at the maze without starting the clock.

Definition at line 106 of file ui.c.

int game_state_size = 0
 

Size of the Pos::state structure.

For stateful games, you need to specify the size of the state structure (as defined by the sizeof operator.)

Definition at line 114 of file ui.c.

gboolean game_stateful = FALSE
 

Are we a stateful game. Default: FALSE.

Definition at line 103 of file ui.c.

gboolean (* game_use_incr_eval)(Pos *, Player) = NULL
 

Should we use the incr eval function.

Definition at line 145 of file ui.c.

gchar* game_white_string = "White"
 

User visible labels for white and black.

Definition at line 98 of file ui.c.

ResultType (* game_who_won)(Pos *, Player, char **) = NULL
 

Checks if the game is over, and if so, who has won.

This function is called after every move, both for single player and two player games.

Parameters:
scorep   pointer to the "score". If game_who_won sets this, the score will be displayed in the score field of the statusbar.

Definition at line 153 of file ui.c.

Referenced by engine_who_won().

Game* games[]
 

Initial value:

 { 
        &Antichess, &Ataxx, &Blet, &Breakthrough, &Checkers, &Chess, 
        &CapturePento, &Dnb, &Eightqueens, &Fifteen, &Flw, &Hiq,
        &Hypermaze, &Infiltrate, &Knights, &Kttour, &Mastermind,
        &Maze, &Memory, &Ninemm, &Othello, &Pacman, &Pentaline,
        &Plot4, &Quarto, &Rgb, &Samegame, &Stopgate, &Tetris, &Towers,
        &Wordtris}

Definition at line 60 of file ui.c.

GtkWidget * main_window
 

The main application window.

Definition at line 168 of file ui.c.

FILE* move_fin
 

Definition at line 73 of file ui.c.

FILE * move_fout
 

Definition at line 73 of file ui.c.

const int num_games = sizeof (games) / sizeof (games[0])
 

Definition at line 68 of file ui.c.

int opt_black = NONE
 

Definition at line 127 of file ui.c.

int opt_delay = DEF_TIME_PER_MOVE
 

Definition at line 124 of file ui.c.

Game* opt_game = NULL
 

Definition at line 121 of file ui.c.

FILE* opt_infile = NULL
 

Definition at line 122 of file ui.c.

FILE* opt_logfile = NULL
 

Definition at line 123 of file ui.c.

int opt_quiet = 0
 

Definition at line 125 of file ui.c.

int opt_verbose = 0
 

Definition at line 130 of file ui.c.

int opt_white = NONE
 

Definition at line 126 of file ui.c.

gboolean state_gui_active = FALSE
 

Definition at line 104 of file ui.c.

int ui_black = NONE
 

Definition at line 129 of file ui.c.

gboolean ui_cheated = FALSE
 

Definition at line 102 of file ui.c.

gboolean ui_gameover = FALSE
 

Definition at line 100 of file ui.c.

GIOChannel* ui_in = NULL [static]
 

Definition at line 75 of file ui.c.

gboolean ui_stopped = TRUE
 

Definition at line 101 of file ui.c.

int ui_white = NONE
 

Definition at line 128 of file ui.c.