diff -r 41468077b5bb -r 52d742aee695 src/game.h --- a/src/game.h Wed Mar 19 15:36:54 2014 +0100 +++ b/src/game.h Sat Mar 22 16:04:02 2014 +0100 @@ -65,6 +65,21 @@ typedef uint8_t Board[8][8]; +typedef struct { + uint8_t piece; + uint8_t fromfile; + uint8_t fromrow; + uint8_t tofile; + uint8_t torow; + _Bool check; + _Bool capture; +} Move; + +#define isfile(file) (file >= 'a' && file <= 'h') +#define isrow(row) (row >= '1' && row <= '8') +#define rowidx(row) (row-'1') +#define fileidx(file) (file-'a') + void game_start(Settings *settings, int opponent); #ifdef __cplusplus