This is the doxygen documentation for gtkboard.

.
Main Page   Data Structures   File List   Data Fields   Globals  

antichess.c File Reference

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

Go to the source code of this file.

Defines

#define ANTICHESS_CELL_SIZE   54
#define ANTICHESS_NUM_PIECES   12
#define ANTICHESS_BOARD_WID   8
#define ANTICHESS_BOARD_HEIT   8
#define ANTICHESS_WK   1
#define ANTICHESS_WQ   2
#define ANTICHESS_WR   3
#define ANTICHESS_WB   4
#define ANTICHESS_WN   5
#define ANTICHESS_WP   6
#define ANTICHESS_BK   7
#define ANTICHESS_BQ   8
#define ANTICHESS_BR   9
#define ANTICHESS_BB   10
#define ANTICHESS_BN   11
#define ANTICHESS_BP   12
#define ANTICHESS_ISWHITE(x)   (x >= 1 && x <= 6)
#define ANTICHESS_ISBLACK(x)   (x >= 7 && x <= 12)
#define abs(x)   ((x) < 0 ? -(x) : (x))

Functions

void antichess_init ()
int antichess_getmove (Pos *, int, int, GtkboardEventType, Player, byte **, int **)
ResultType antichess_who_won (Pos *, Player, char **)
byte* antichess_movegen (Pos *)
ResultType antichess_eval (Pos *, Player, float *)
ResultType antichess_eval_incr (Pos *, Player, byte *, float *)
int isfreeline (byte *pos, int oldx, int oldy, int newx, int newy)
int islegal (Pos *pos, int oldx, int oldy, int x, int y, int player)
int can_capture (Pos *pos, int player)
int oppcolor (byte *pos, int oldx, int oldy, int x, int y)
void antichess_free ()
int hasmove (Pos *pos, int player)
int antichess_movegen_square (byte *pos, byte **movp, int player, int oldx, int oldy, int x, int y)
int antichess_movegen_line (byte *pos, byte **movp, int player, int x, int y, int incx, int incy)
void antichess_movegen_promote (byte *board, byte **movp, int player, int oldx, int oldy, int x, int y)

Variables

char antichess_colors []
char antichess_highlight_colors [9] = {0xff, 0, 0}
int antichess_init_pos []
int antichess_max_moves = 200
char** antichess_pixmaps []
Game Antichess
Gameplugin_game = &Antichess
int oldx = -1
int oldy = -1
int oldval = -1
int prom = 0
int prom_x
int prom_oldx


Define Documentation

#define ANTICHESS_BB   10
 

Definition at line 42 of file antichess.c.

#define ANTICHESS_BK   7
 

Definition at line 39 of file antichess.c.

#define ANTICHESS_BN   11
 

Definition at line 43 of file antichess.c.

#define ANTICHESS_BOARD_HEIT   8
 

Definition at line 31 of file antichess.c.

#define ANTICHESS_BOARD_WID   8
 

Definition at line 30 of file antichess.c.

#define ANTICHESS_BP   12
 

Definition at line 44 of file antichess.c.

#define ANTICHESS_BQ   8
 

Definition at line 40 of file antichess.c.

#define ANTICHESS_BR   9
 

Definition at line 41 of file antichess.c.

#define ANTICHESS_CELL_SIZE   54
 

Definition at line 27 of file antichess.c.

#define ANTICHESS_ISBLACK( x )   (x >= 7 && x <= 12)
 

Definition at line 47 of file antichess.c.

Referenced by antichess_eval(), antichess_getmove(), antichess_movegen(), antichess_movegen_square(), can_capture(), hasmove(), and oppcolor().

#define ANTICHESS_ISWHITE( x )   (x >= 1 && x <= 6)
 

Definition at line 46 of file antichess.c.

Referenced by antichess_eval(), antichess_getmove(), antichess_movegen(), antichess_movegen_square(), can_capture(), hasmove(), and oppcolor().

#define ANTICHESS_NUM_PIECES   12
 

Definition at line 28 of file antichess.c.

#define ANTICHESS_WB   4
 

Definition at line 36 of file antichess.c.

#define ANTICHESS_WK   1
 

Definition at line 33 of file antichess.c.

#define ANTICHESS_WN   5
 

Definition at line 37 of file antichess.c.

#define ANTICHESS_WP   6
 

Definition at line 38 of file antichess.c.

#define ANTICHESS_WQ   2
 

Definition at line 34 of file antichess.c.

#define ANTICHESS_WR   3
 

Definition at line 35 of file antichess.c.

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

Definition at line 50 of file antichess.c.

Referenced by are_nbrs(), ataxx_getmove(), breakthrough_getmove(), checkers_getmove(), chess_getmove(), chess_movegen_enpassant(), hiq_getmove(), hypermaze_getmove(), infiltrate_getmove(), isfreeline(), islegal(), knights_getmove(), and knights_getmove_kb().


Function Documentation

ResultType antichess_eval ( Pos * pos,
Player player,
float * eval )
 

Definition at line 653 of file antichess.c.

ResultType antichess_eval_incr ( Pos * pos,
Player player,
byte * move,
float * eval )
 

Definition at line 676 of file antichess.c.

void antichess_free ( )
 

Definition at line 236 of file antichess.c.

int antichess_getmove ( Pos * pos,
int x,
int y,
GtkboardEventType type,
Player player,
byte ** movep,
int ** rmovep )
 

Definition at line 241 of file antichess.c.

void antichess_init ( )
 

Definition at line 105 of file antichess.c.

byte* antichess_movegen ( Pos * pos )
 

Definition at line 459 of file antichess.c.

int antichess_movegen_line ( byte * pos,
byte ** movp,
int player,
int x,
int y,
int incx,
int incy )
 

Definition at line 421 of file antichess.c.

Referenced by antichess_movegen().

void antichess_movegen_promote ( byte * board,
byte ** movp,
int player,
int oldx,
int oldy,
int x,
int y ) [static]
 

Definition at line 438 of file antichess.c.

Referenced by antichess_movegen().

int antichess_movegen_square ( byte * pos,
byte ** movp,
int player,
int oldx,
int oldy,
int x,
int y )
 

Definition at line 402 of file antichess.c.

Referenced by antichess_movegen(), and antichess_movegen_line().

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

Definition at line 373 of file antichess.c.

int can_capture ( Pos * pos,
int player ) [static]
 

Definition at line 203 of file antichess.c.

Referenced by antichess_getmove().

int hasmove ( Pos * pos,
int player ) [static]
 

Definition at line 357 of file antichess.c.

int isfreeline ( byte * pos,
int oldx,
int oldy,
int newx,
int newy ) [static]
 

Definition at line 136 of file antichess.c.

int islegal ( Pos * pos,
int oldx,
int oldy,
int x,
int y,
int player ) [static]
 

Definition at line 149 of file antichess.c.

int oppcolor ( byte * board,
int oldx,
int oldy,
int x,
int y ) [static]
 

Definition at line 224 of file antichess.c.


Variable Documentation

Game Antichess
 

Initial value:

 
        { ANTICHESS_CELL_SIZE, ANTICHESS_BOARD_WID, ANTICHESS_BOARD_HEIT, 
        ANTICHESS_NUM_PIECES,
        antichess_colors, antichess_init_pos, antichess_pixmaps, "Antichess",
        antichess_init}

Definition at line 97 of file antichess.c.

char antichess_colors[] [static]
 

Initial value:

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

Definition at line 53 of file antichess.c.

char antichess_highlight_colors[9] = {0xff, 0, 0}
 

Definition at line 56 of file antichess.c.

int antichess_init_pos[] [static]
 

Initial value:

 
{
         9 , 11, 10, 8 , 7 , 10, 11, 9  ,
         12, 12, 12, 12, 12, 12, 12, 12 ,
         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  ,
         6 , 6 , 6 , 6 , 6 , 6 , 6 , 6  ,
         3 , 5 , 4 , 2 , 1 , 4 , 5 , 3  ,
}

Definition at line 58 of file antichess.c.

int antichess_max_moves = 200 [static]
 

Definition at line 69 of file antichess.c.

char** antichess_pixmaps[] [static]
 

Initial value:

{
        chess_wk_54_xpm, 
        chess_wq_54_xpm, 
        chess_wr_54_xpm, 
        chess_wb_54_xpm, 
        chess_wn_54_xpm, 
        chess_wp_54_xpm, 
        chess_bk_54_xpm, 
        chess_bq_54_xpm, 
        chess_br_54_xpm, 
        chess_bb_54_xpm, 
        chess_bn_54_xpm, 
        chess_bp_54_xpm,
}

Definition at line 71 of file antichess.c.

int oldval = -1 [static]
 

Definition at line 233 of file antichess.c.

int oldx = -1 [static]
 

Definition at line 233 of file antichess.c.

int oldy = -1 [static]
 

Definition at line 233 of file antichess.c.

Game* plugin_game = &Antichess
 

Definition at line 103 of file antichess.c.

int prom = 0 [static]
 

Definition at line 234 of file antichess.c.

int prom_oldx [static]
 

Definition at line 234 of file antichess.c.

int prom_x [static]
 

Definition at line 234 of file antichess.c.