1.1 --- a/src/game.h Wed Mar 19 10:08:25 2014 +0100 1.2 +++ b/src/game.h Wed Mar 19 15:36:54 2014 +0100 1.3 @@ -31,11 +31,40 @@ 1.4 #define GAME_H 1.5 1.6 #include "terminal-chess.h" 1.7 +#include <stdint.h> 1.8 1.9 #ifdef __cplusplus 1.10 extern "C" { 1.11 #endif 1.12 1.13 +#define PIECE_MASK 0x0F 1.14 +#define COLOR_MASK 0xF0 1.15 + 1.16 +#define WHITE 0x10 1.17 +#define BLACK 0x20 1.18 + 1.19 +#define PAWN 0x01 1.20 +#define ROOK 0x02 1.21 +#define KNIGHT 0x03 1.22 +#define BISHOP 0x04 1.23 +#define QUEEN 0x05 1.24 +#define KING 0x06 1.25 + 1.26 +#define WPAWN (WHITE|PAWN) 1.27 +#define WROOK (WHITE|ROOK) 1.28 +#define WKNIGHT (WHITE|KNIGHT) 1.29 +#define WBISHOP (WHITE|BISHOP) 1.30 +#define WQUEEN (WHITE|QUEEN) 1.31 +#define WKING (WHITE|KING) 1.32 +#define BPAWN (BLACK|PAWN) 1.33 +#define BROOK (BLACK|ROOK) 1.34 +#define BKNIGHT (BLACK|KNIGHT) 1.35 +#define BBISHOP (BLACK|BISHOP) 1.36 +#define BQUEEN (BLACK|QUEEN) 1.37 +#define BKING (BLACK|KING) 1.38 + 1.39 +typedef uint8_t Board[8][8]; 1.40 + 1.41 void game_start(Settings *settings, int opponent); 1.42 1.43 #ifdef __cplusplus