This is the doxygen documentation for gtkboard.

.
Main Page   Data Structures   File List   Data Fields   Globals  

breakthrough.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include "game.h"
#include "../pixmaps/chess.xpm"

Go to the source code of this file.

Defines

#define BREAKTHROUGH_CELL_SIZE   54
#define BREAKTHROUGH_NUM_PIECES   2
#define BREAKTHROUGH_BOARD_WID   8
#define BREAKTHROUGH_BOARD_HEIT   8
#define BREAKTHROUGH_EMPTY   0
#define BREAKTHROUGH_WP   1
#define BREAKTHROUGH_BP   2

Functions

int breakthrough_getmove (Pos *, int, int, GtkboardEventType, Player, byte **, int **)
int breakthrough_getmove_kb (Pos *, int, Player, byte **, int **)
void breakthrough_init ()
ResultType breakthrough_who_won (Pos *, Player, char **)
ResultType breakthrough_eval (Pos *, Player, float *eval)
ResultType breakthrough_eval_incr (Pos *, Player, byte *, float *)
byte* breakthrough_movegen (Pos *)
void* breakthrough_newstate (Pos *, byte *)
gboolean eval_is_backward (byte *board, int x, int y)
gboolean eval_is_passer (byte *board, int x, int y)
gboolean eval_is_blocked (byte *board, int x, int y)

Variables

int breakthrough_initpos [BREAKTHROUGH_BOARD_WID *BREAKTHROUGH_BOARD_HEIT]
char** breakthrough_pixmaps []
int breakthrough_curx = -1
int breakthrough_cury = -1
char breakthrough_colors []
Game Breakthrough


Define Documentation

#define BREAKTHROUGH_BOARD_HEIT   8
 

Definition at line 31 of file breakthrough.c.

#define BREAKTHROUGH_BOARD_WID   8
 

Definition at line 30 of file breakthrough.c.

#define BREAKTHROUGH_BP   2
 

Definition at line 35 of file breakthrough.c.

#define BREAKTHROUGH_CELL_SIZE   54
 

Definition at line 27 of file breakthrough.c.

#define BREAKTHROUGH_EMPTY   0
 

Definition at line 33 of file breakthrough.c.

#define BREAKTHROUGH_NUM_PIECES   2
 

Definition at line 28 of file breakthrough.c.

#define BREAKTHROUGH_WP   1
 

Definition at line 34 of file breakthrough.c.


Function Documentation

ResultType breakthrough_eval ( Pos * pos,
Player player,
float * eval ) [static]
 

Definition at line 141 of file breakthrough.c.

ResultType breakthrough_eval_incr ( Pos * pos,
Player player,
byte * move,
float * eval ) [static]
 

Definition at line 225 of file breakthrough.c.

int breakthrough_getmove ( Pos * pos,
int x,
int y,
GtkboardEventType type,
Player player,
byte ** movp,
int ** rmovp ) [static]
 

Definition at line 279 of file breakthrough.c.

int breakthrough_getmove_kb ( Pos *,
int,
Player,
byte **,
int ** ) [static]
 

void breakthrough_init ( )
 

Definition at line 74 of file breakthrough.c.

byte* breakthrough_movegen ( Pos * pos ) [static]
 

Definition at line 234 of file breakthrough.c.

void* breakthrough_newstate ( Pos *,
byte * ) [static]
 

ResultType breakthrough_who_won ( Pos *,
Player,
char ** ) [static]
 

gboolean eval_is_backward ( byte * board,
int x,
int y ) [static]
 

Definition at line 91 of file breakthrough.c.

Referenced by breakthrough_eval().

gboolean eval_is_blocked ( byte * board,
int x,
int y ) [static]
 

Definition at line 135 of file breakthrough.c.

gboolean eval_is_passer ( byte * board,
int x,
int y ) [static]
 

Definition at line 119 of file breakthrough.c.

Referenced by breakthrough_eval().


Variable Documentation

Game Breakthrough
 

Initial value:

 { BREAKTHROUGH_CELL_SIZE, BREAKTHROUGH_BOARD_WID, BREAKTHROUGH_BOARD_HEIT, 
        BREAKTHROUGH_NUM_PIECES, 
        breakthrough_colors, breakthrough_initpos, breakthrough_pixmaps, "Breakthrough", breakthrough_init}

Definition at line 70 of file breakthrough.c.

char breakthrough_colors[] [static]
 

Initial value:

 
        {200, 200, 130, 
        0, 140, 0}

Definition at line 58 of file breakthrough.c.

int breakthrough_curx = -1
 

Definition at line 56 of file breakthrough.c.

int breakthrough_cury = -1
 

Definition at line 56 of file breakthrough.c.

int breakthrough_initpos[BREAKTHROUGH_BOARD_WID*BREAKTHROUGH_BOARD_HEIT]
 

Initial value:

 
{
        2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 ,
        2 , 2 , 2 , 2 , 2 , 2 , 2 , 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 , 0 , 0 , 0 , 0 , 0 ,
        1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 ,
        1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 ,
}

Definition at line 37 of file breakthrough.c.

char** breakthrough_pixmaps[]
 

Initial value:

 
{
        chess_wp_54_xpm,
        chess_bp_54_xpm,
}

Definition at line 50 of file breakthrough.c.