This is the doxygen documentation for gtkboard.

.
Main Page   Data Structures   File List   Data Fields   Globals  

plot4.c File Reference

#include <stdio.h>
#include <string.h>
#include <assert.h>
#include <stdlib.h>
#include "game.h"
#include "aaball.h"

Go to the source code of this file.

Defines

#define PLOT4_CELL_SIZE   55
#define PLOT4_NUM_PIECES   3
#define PLOT4_BOARD_WID   7
#define PLOT4_BOARD_HEIT   6
#define PLOT4_WP   1
#define PLOT4_BP   2
#define PLOT4_EMPTY   3

Functions

void plot4_init ()
int eval_runs (Pos *, int)
int find_runs (byte *, int, int, int, int, int, int)
int plot4_getmove (Pos *, int, int, GtkboardEventType, Player, byte **, int **)
ResultType plot4_who_won (Pos *, Player, char **)
void plot4_set_init_pos (Pos *pos)
char** plot4_get_pixmap (int, int)
byte* plot4_movegen (Pos *)
 movegen function.

ResultType plot4_eval (Pos *, Player, float *)
int plot4_islegal (byte *board, int x, int y)
byte* plot4_movegen_single (char *pos, int player, int reset)

Variables

char plot4_colors [6] = {160, 140, 100, 160, 140, 100}
int* plot4_init_pos = NULL
Game Plot4
const int RUN_WT = 20


Detailed Description

Definition in file plot4.c.


Define Documentation

#define PLOT4_BOARD_HEIT   6
 

Definition at line 34 of file plot4.c.

#define PLOT4_BOARD_WID   7
 

Definition at line 33 of file plot4.c.

#define PLOT4_BP   2
 

Definition at line 41 of file plot4.c.

#define PLOT4_CELL_SIZE   55
 

Definition at line 30 of file plot4.c.

#define PLOT4_EMPTY   3
 

Definition at line 42 of file plot4.c.

#define PLOT4_NUM_PIECES   3
 

Definition at line 31 of file plot4.c.

#define PLOT4_WP   1
 

Definition at line 40 of file plot4.c.


Function Documentation

int eval_runs ( Pos * pos,
int forwhom ) [static]
 

Definition at line 169 of file plot4.c.

Referenced by plot4_eval(), and plot4_who_won().

int find_runs ( byte * board,
int x0,
int y0,
int dx,
int dy,
int len,
int forwhom ) [static]
 

Definition at line 195 of file plot4.c.

Referenced by eval_runs().

ResultType plot4_eval ( Pos * pos,
Player to_play,
float * eval ) [static]
 

Definition at line 159 of file plot4.c.

char** plot4_get_pixmap ( int idx,
int color ) [static]
 

Definition at line 293 of file plot4.c.

int plot4_getmove ( Pos * pos,
int x,
int y,
GtkboardEventType type,
Player to_play,
byte ** movp,
int ** rmovep ) [static]
 

Definition at line 129 of file plot4.c.

void plot4_init ( )
 

Definition at line 66 of file plot4.c.

int plot4_islegal ( byte * board,
int x,
int y )
 

Definition at line 119 of file plot4.c.

byte * plot4_movegen ( Pos * pos ) [static]
 

movegen function.

Definition at line 269 of file plot4.c.

byte* plot4_movegen_single ( char * pos,
int player,
int reset )
 

Definition at line 240 of file plot4.c.

void plot4_set_init_pos ( Pos * pos ) [static]
 

Definition at line 87 of file plot4.c.

ResultType plot4_who_won ( Pos * pos,
Player to_play,
char ** commp ) [static]
 

Definition at line 94 of file plot4.c.


Variable Documentation

Game Plot4
 

Initial value:

 { PLOT4_CELL_SIZE, PLOT4_BOARD_WID, PLOT4_BOARD_HEIT, 
        PLOT4_NUM_PIECES,
        plot4_colors,  NULL, NULL, "Plot4", plot4_init}

Definition at line 47 of file plot4.c.

const int RUN_WT = 20 [static]
 

Definition at line 63 of file plot4.c.

char plot4_colors[6] = {160, 140, 100, 160, 140, 100}
 

Definition at line 36 of file plot4.c.

int* plot4_init_pos = NULL
 

Definition at line 38 of file plot4.c.