src/game.h

changeset 14
970748b9a73b
parent 13
faec61c4901f
child 16
a298c6637c30
     1.1 --- a/src/game.h	Wed Mar 26 14:12:59 2014 +0100
     1.2 +++ b/src/game.h	Wed Mar 26 14:53:15 2014 +0100
     1.3 @@ -37,8 +37,9 @@
     1.4  extern "C" {
     1.5  #endif
     1.6  
     1.7 -#define PIECE_MASK 0x0F
     1.8 -#define COLOR_MASK 0xF0
     1.9 +#define PIECE_MASK       0x0F
    1.10 +#define COLOR_MASK       0x30
    1.11 +#define ENPASSANT_THREAT 0x40
    1.12  
    1.13  #define WHITE 0x10
    1.14  #define BLACK 0x20
    1.15 @@ -77,6 +78,8 @@
    1.16  } Move;
    1.17  
    1.18  #define POS_UNSPECIFIED UINT8_MAX
    1.19 +#define mdst(b,m) b[m->torow][m->tofile]
    1.20 +#define msrc(b,m) b[m->fromrow][m->fromfile]
    1.21  
    1.22  #define isidx(idx) ((uint8_t)idx < 8)
    1.23  

mercurial