1.1 --- a/src/game.h Wed Mar 19 15:36:54 2014 +0100 1.2 +++ b/src/game.h Sat Mar 22 16:04:02 2014 +0100 1.3 @@ -65,6 +65,21 @@ 1.4 1.5 typedef uint8_t Board[8][8]; 1.6 1.7 +typedef struct { 1.8 + uint8_t piece; 1.9 + uint8_t fromfile; 1.10 + uint8_t fromrow; 1.11 + uint8_t tofile; 1.12 + uint8_t torow; 1.13 + _Bool check; 1.14 + _Bool capture; 1.15 +} Move; 1.16 + 1.17 +#define isfile(file) (file >= 'a' && file <= 'h') 1.18 +#define isrow(row) (row >= '1' && row <= '8') 1.19 +#define rowidx(row) (row-'1') 1.20 +#define fileidx(file) (file-'a') 1.21 + 1.22 void game_start(Settings *settings, int opponent); 1.23 1.24 #ifdef __cplusplus