This is the doxygen documentation for gtkboard.
.#include <stdio.h>
#include <string.h>
#include <assert.h>
#include <stdlib.h>
#include <unistd.h>
#include "game.h"
#include "aaball.h"
Go to the source code of this file.
Data Structures | |
struct | Pentaline_state |
Defines | |
#define | PENTALINE_CELL_SIZE 40 |
#define | PENTALINE_NUM_PIECES 2 |
#define | PENTALINE_BOARD_WID 12 |
#define | PENTALINE_BOARD_HEIT 12 |
#define | PENTALINE_RP 1 |
#define | PENTALINE_BP 2 |
#define | PENTALINE_EMPTY 0 |
#define | FIRST_WON { *eval = player == WHITE ? (1 << 20) : - (1 << 20); return player == WHITE ? RESULT_WHITE : RESULT_BLACK; } |
#define | SECOND_WON { *eval = player == WHITE ? - (1 << 20) : (1 << 20); return player == WHITE ? RESULT_BLACK : RESULT_WHITE; } |
Functions | |
void | pentaline_init () |
int | pentaline_getmove (Pos *, int, int, GtkboardEventType, Player, byte **, int **) |
ResultType | pentaline_who_won (Pos *, Player, char **) |
void | pentaline_set_init_pos (Pos *pos) |
unsigned char* | pentaline_get_rgbmap (int idx, int color) |
ResultType | pentaline_eval_incr (Pos *, Player, byte *, float *) |
byte* | pentaline_movegen (Pos *) |
ResultType | pentaline_eval (Pos *, Player, float *) |
void* | pentaline_newstate (Pos *pos, byte *move) |
float | eval_line (byte *board, int x, int y, int incx, int incy) |
float | eval_line_bidir (byte *board, int x, int y, int incx, int incy) |
float | eval_runs (byte *board) |
void | get_chain_info (byte *board, int x, int y, int dx, int dy, int *len, int *open, int *color) |
void | update_state (byte chains[5][2][2], int len, int open, int color, int inc) |
Variables | |
char | pentaline_colors [9] = {200, 220, 200, 200, 220, 200, 0, 0, 0} |
Game | Pentaline |
int | incx [4] = { 0, 1, 1, -1 } |
int | incy [4] = { 1, 0, 1, 1 } |
Definition in file pentaline.c.
|
|
|
Definition at line 35 of file pentaline.c. |
|
Definition at line 34 of file pentaline.c. |
|
Definition at line 38 of file pentaline.c. |
|
Definition at line 31 of file pentaline.c. |
|
Definition at line 39 of file pentaline.c. |
|
Definition at line 32 of file pentaline.c. |
|
Definition at line 37 of file pentaline.c. |
|
|
|
Definition at line 233 of file pentaline.c. Referenced by eval_line_bidir(), and eval_runs(). |
|
Definition at line 261 of file pentaline.c. Referenced by pentaline_eval_incr(). |
|
Definition at line 276 of file pentaline.c. |
|
Definition at line 373 of file pentaline.c. Referenced by pentaline_newstate(). |
|
Definition at line 308 of file pentaline.c. |
|
Definition at line 296 of file pentaline.c. |
|
Definition at line 219 of file pentaline.c. |
|
Definition at line 202 of file pentaline.c. |
|
Definition at line 67 of file pentaline.c. |
|
Definition at line 94 of file pentaline.c. |
|
Definition at line 418 of file pentaline.c. |
|
|
|
Definition at line 159 of file pentaline.c. |
|
Definition at line 405 of file pentaline.c. Referenced by pentaline_newstate(). |
|
Initial value: { PENTALINE_CELL_SIZE, PENTALINE_BOARD_WID, PENTALINE_BOARD_HEIT, PENTALINE_NUM_PIECES, pentaline_colors, NULL, NULL, "Pentaline", pentaline_init} Definition at line 46 of file pentaline.c. |
|
Definition at line 293 of file pentaline.c. |
|
Definition at line 294 of file pentaline.c. |
|
Definition at line 41 of file pentaline.c. |