This is the doxygen documentation for gtkboard.

.
Main Page   Data Structures   File List   Data Fields   Globals  

hiq.c File Reference

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

Go to the source code of this file.

Data Structures

struct  Hiq_state

Defines

#define HIQ_CELL_SIZE   54
#define HIQ_NUM_PIECES   5
#define HIQ_BOARD_WID   7
#define HIQ_BOARD_HEIT   7
#define abs(x)   ((x) < 0 ? -(x):(x))
#define HIQ_EMPTY   0
#define HIQ_RP   1
#define HIQ_BP   2
#define HIQ_UNUSED   3
#define HIQ_HOLE   4

Functions

void hiq_init ()
int hiq_getmove (Pos *, int, int, GtkboardEventType, Player, byte **, int **)
ResultType hiq_who_won (Pos *, Player, char **)
char** hiq_get_pixmap (int, int)
void hiq_reset_uistate ()

Variables

char hiq_colors [6] = {170, 170, 170, 170, 170, 170}
int hiq_init_pos [HIQ_BOARD_WID *HIQ_BOARD_HEIT]
char* grey_square_54_xpm []
Game Hiq
int oldx = -1
int oldy = -1


Define Documentation

#define HIQ_BOARD_HEIT   7
 

Definition at line 32 of file hiq.c.

#define HIQ_BOARD_WID   7
 

Definition at line 31 of file hiq.c.

#define HIQ_BP   2
 

Definition at line 52 of file hiq.c.

#define HIQ_CELL_SIZE   54
 

Definition at line 28 of file hiq.c.

#define HIQ_EMPTY   0
 

Definition at line 50 of file hiq.c.

#define HIQ_HOLE   4
 

Definition at line 54 of file hiq.c.

#define HIQ_NUM_PIECES   5
 

Definition at line 29 of file hiq.c.

#define HIQ_RP   1
 

Definition at line 51 of file hiq.c.

#define HIQ_UNUSED   3
 

Definition at line 53 of file hiq.c.

#define abs( x )   ((x) < 0 ? -(x):(x))
 

Definition at line 35 of file hiq.c.


Function Documentation

char** hiq_get_pixmap ( int idx,
int color )
 

Definition at line 160 of file hiq.c.

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

Definition at line 222 of file hiq.c.

void hiq_init ( )
 

Definition at line 134 of file hiq.c.

void hiq_reset_uistate ( )
 

Definition at line 216 of file hiq.c.

ResultType hiq_who_won ( Pos * pos,
Player player,
char ** commp )
 

Definition at line 176 of file hiq.c.


Variable Documentation

Game Hiq
 

Initial value:

 { HIQ_CELL_SIZE, HIQ_BOARD_WID, HIQ_BOARD_HEIT, 
        HIQ_NUM_PIECES, 
        hiq_colors, hiq_init_pos, NULL, "Hiq", 
        hiq_init}

Definition at line 119 of file hiq.c.

char* grey_square_54_xpm[] [static]
 

Definition at line 56 of file hiq.c.

char hiq_colors[6] = {170, 170, 170, 170, 170, 170}
 

Definition at line 37 of file hiq.c.

int hiq_init_pos[HIQ_BOARD_WID*HIQ_BOARD_HEIT]
 

Initial value:

 
{
         3 , 3 , 1 , 1 , 1 , 3 , 3 ,
         3 , 3 , 1 , 1 , 1 , 3 , 3 ,
         1 , 1 , 1 , 1 , 1 , 1 , 1 ,
         1 , 1 , 1 , 4 , 1 , 1 , 1 ,
         1 , 1 , 1 , 1 , 1 , 1 , 1 ,
         3 , 3 , 1 , 1 , 1 , 3 , 3 ,
         3 , 3 , 1 , 1 , 1 , 3 , 3 ,
}

Definition at line 39 of file hiq.c.

int oldx = -1 [static]
 

Definition at line 214 of file hiq.c.

int oldy = -1 [static]
 

Definition at line 214 of file hiq.c.