Name
GoGame -- game related information
Args
"black" gpointer : Read / Write
"white" gpointer : Read / Write
"board" gpointer : Read / Write
"handicap" gint : Read / Write
"komi" gdouble : Read / Write |
Description
The GoGame type records all information about a single game.
Details
struct GoGame
struct GoGame {
GoPlayer * black;
GoPlayer * white;
GoGameResult res;
double probability;
}; |
go_game_new ()
GtkObject* go_game_new (GoData *data,
time_t date,
const char *black,
const char *white,
GoBoardSize board,
int handicap,
double komi,
GoGameResult res); |
Allocate a new GoGame object, fill it with values, and
connect it to data.
go_game_new_fake ()
GtkObject* go_game_new_fake (GoData *data); |
Allocate a new fake GoGame object and connect it to data. This
object may be used for internal purposes and does not correspond
to a real game. The data must be filled in manually.
go_game_read ()
GtkObject* go_game_read (GoData *data,
xmlNodePtr node); |
This is a constructor for GoGame objects,
which reads all data from a XML tree.
go_game_write ()
void go_game_write (GoGame *self,
xmlNodePtr node); |
Dump all game data into node.
enum GoBoardSize
typedef enum { b19=19, b13=13, b9=9 } GoBoardSize; |
This type specifies the board size assoziated with a given game. Only
the standard board sizes are supported, because the value of handicap
stones for other board sizes is not know to the preogram.
board_to_str ()
Convert board to a human-understandable textual representation.
enum GoGameResult
typedef enum { res_BLACK, res_WHITE, res_JIGO } GoGameResult; |
The type to specify a game's outcome.
result_to_str ()
Convert res to human understandable textual representation.
Args
- "black" (gpointer : Read / Write)
- "white" (gpointer : Read / Write)
- "board" (gpointer : Read / Write)
- "handicap" (gint : Read / Write)
- "komi" (gdouble : Read / Write)