diff options
Diffstat (limited to 'include/tak.h')
| -rw-r--r-- | include/tak.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/tak.h b/include/tak.h index c703943..d161640 100644 --- a/include/tak.h +++ b/include/tak.h @@ -16,6 +16,12 @@ enum MOVE_DIRECTION { M_UP, M_DOWN, M_LEFT, M_RIGHT }; typedef uint8_t data_t; typedef uint16_t colour_stack_t; +#define NUM_SHIFT 4 +#define STONE_MASK 0b00000011 +#define STONE_AT(l) (celldat[(l)] & STONE_MASK) +#define COUNT_AT(l) (celldat[(l)] >> NUM_SHIFT) +#define THE_COORDS(x,y) ((x)+(y)*board_size) + uint8_t board_size; data_t celldat[36]; colour_stack_t colours[36]; |
