My Project
xboard.c File Reference

xboard protocol. More...

#include "bit.h"
#include "event.h"
#include "options.h"
#include "opening.h"
#include "play.h"
#include "search.h"
#include "stats.h"
#include "util.h"
#include "ui.h"
#include <stdarg.h>

Go to the source code of this file.

Classes

struct  XBoardStats
 

Functions

static void xboard_observer (Result *result)
 Search oberver.
 
void ui_init_xboard (UI *ui)
 initialize xboard protocol.
 
void ui_free_xboard (UI *ui)
 free resources used by xboard protocol.
 
static void xboard_error (const char *format,...)
 Print an error.
 
static void xboard_send (const char *format,...)
 Send a command to xboard/winboard GUI.
 
static void xboard_setup (Play *play)
 
static void xboard_move (const int x)
 Send a move to xboard/winboard GUI.
 
static void xboard_hint (Play *play)
 Send a hint.
 
static void xboard_book (Play *play)
 Send a move from the book, if available.
 
static void xboard_check_game_over (Play *play)
 Check if the game is over.
 
static int hash_size (int n)
 
static void xboard_go (UI *ui, XBoardStats *stats)
 
void xboard_stop_analyzing (Play *play)
 Stop analyzing.
 
static void xboard_analyze (Play *play)
 Analyze.
 
static void xboard_loop_analyze (UI *ui)
 Analyze.
 
void ui_loop_xboard (UI *ui)
 Loop event.
 

Variables

Log xboard_log [1]
 

Detailed Description

xboard protocol.

Of course, only the "reversi" variant is supported.

Date
1998 - 2017
Author
Richard Delorme
Version
4.4

Function Documentation

◆ hash_size()

static int hash_size ( int n)
inlinestatic

Compute the hash tables size in MB

◆ ui_free_xboard()

void ui_free_xboard ( UI * ui)

free resources used by xboard protocol.

Parameters
uiuser interface.

◆ ui_init_xboard()

void ui_init_xboard ( UI * ui)

initialize xboard protocol.

Parameters
uiuser interface.

◆ ui_loop_xboard()

void ui_loop_xboard ( UI * ui)

Loop event.

Parameters
uiuser interface.

◆ xboard_analyze()

static void xboard_analyze ( Play * play)
static

Analyze.

Analyze a position. Activate the thread suspended in xboard_loop_analyze.

Parameters
playPlay.

◆ xboard_book()

static void xboard_book ( Play * play)
static

Send a move from the book, if available.

Parameters
playPlay engine.

◆ xboard_check_game_over()

static void xboard_check_game_over ( Play * play)
static

Check if the game is over.

Parameters
playPlay engine.

◆ xboard_error()

static void xboard_error ( const char * format,
... )
static

Print an error.

Parameters
formatformat string.

◆ xboard_go()

static void xboard_go ( UI * ui,
XBoardStats * stats )
static

Search for a move.

Parameters
uiUser Interface.
statstotal nodes & time statistics.

◆ xboard_hint()

static void xboard_hint ( Play * play)
static

Send a hint.

Parameters
playPlay engine.

◆ xboard_loop_analyze()

static void xboard_loop_analyze ( UI * ui)
static

Analyze.

Analyze loop.

Parameters
uiUser Interface.

◆ xboard_move()

static void xboard_move ( const int x)
static

Send a move to xboard/winboard GUI.

Parameters
xMove coordinate.

◆ xboard_observer()

static void xboard_observer ( Result * result)
static

Search oberver.

Parameters
resultSearch Result.

◆ xboard_send()

static void xboard_send ( const char * format,
... )
static

Send a command to xboard/winboard GUI.

Parameters
formatformat string.

◆ xboard_setup()

static void xboard_setup ( Play * play)
static

◆ xboard_stop_analyzing()

void xboard_stop_analyzing ( Play * play)

Stop analyzing.

If edax is analyzing, stop the search, and wait that the analyzing thread is suspended.

Parameters
playPlay.

Variable Documentation

◆ xboard_log

Log xboard_log[1]