This is the doxygen documentation for gtkboard.
.#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <gdk/gdkkeysyms.h>
#include "game.h"
#include "aaball.h"
Go to the source code of this file.
Defines | |
#define | OTHELLO_CELL_SIZE 55 |
#define | OTHELLO_NUM_PIECES 2 |
#define | OTHELLO_BOARD_WID 8 |
#define | OTHELLO_BOARD_HEIT 8 |
#define | OTHELLO_WP 1 |
#define | OTHELLO_BP 2 |
#define | OTHELLO_EMPTY 0 |
Enumerations | |
enum | { SAFE, UNSAFE, UNKNOWN } |
Functions | |
int | othello_getmove (Pos *, int, int, GtkboardEventType, Player, byte **, int **) |
int | othello_getmove_kb (Pos *pos, int key, Player player, byte **movp, int **rmovp) |
void | othello_init () |
ResultType | othello_who_won (Pos *, Player, char **) |
ResultType | othello_eval (Pos *, Player, float *) |
ResultType | othello_eval_incr (Pos *, Player, byte *, float *) |
byte* | othello_movegen (Pos *) |
char** | othello_get_pixmap (int, int) |
guchar* | othello_get_rgbmap (int, int) |
gboolean | othello_use_incr_eval (Pos *pos, Player player) |
int | get_sandwich_len (Pos *pos, int x0, int y0, int dx, int dy, byte player) |
gboolean | hasmove (Pos *pos, Player player) |
float | othello_eval_count (Pos *pos) |
int | othello_eval_mobility_count (Pos *pos, int color) |
float | othello_eval_mobility (Pos *pos) |
float | othello_eval_liberty (Pos *pos) |
Faster approxmiation for mobility. | |
int | othello_eval_num_moves (Pos *pos) |
int | othello_eval_is_safe (Pos *pos, int x, int y, byte our) |
float | othello_eval_safe (Pos *pos) |
float | othello_eval_material (Pos *pos) |
float | othello_eval_weights (Pos *pos) |
Variables | |
char | othello_colors [6] = {200, 200, 200, 140, 140, 140} |
int | othello_init_pos [OTHELLO_BOARD_WID *OTHELLO_BOARD_HEIT] |
Game | Othello |
int | incx [] = { -1, -1, -1, 0, 0, 1, 1, 1} |
int | incy [] = { -1, 0, 1, -1, 1, -1, 0, 1} |
byte* | safe_cached |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Definition at line 137 of file othello.c. Referenced by hasmove(), othello_eval_mobility_count(), othello_getmove(), and othello_movegen(). |
|
Definition at line 153 of file othello.c. Referenced by antichess_who_won(), othello_getmove(), and othello_getmove_kb(). |
|
|
|
|
|
|
|
Definition at line 371 of file othello.c. Referenced by othello_eval_safe(). |
|
Faster approxmiation for mobility.
Definition at line 334 of file othello.c. Referenced by othello_eval(). |
|
Definition at line 447 of file othello.c. Referenced by othello_eval(). |
|
|
|
Definition at line 305 of file othello.c. Referenced by othello_eval_mobility(). |
|
|
|
Definition at line 397 of file othello.c. Referenced by othello_eval(). |
|
Definition at line 460 of file othello.c. Referenced by othello_eval(). |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Initial value: { OTHELLO_CELL_SIZE, OTHELLO_BOARD_WID, OTHELLO_BOARD_HEIT, OTHELLO_NUM_PIECES, othello_colors, othello_init_pos, NULL, "Othello", othello_init} |
|
|
|
|
|
|
|
Initial value: { 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 2 , 1 , 0 , 0 , 0 , 0 , 0 , 0 , 1 , 2 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , } |
|
|