diff options
| author | tslil <tslil@posteo.de> | 2020-12-30 18:39:20 -0500 |
|---|---|---|
| committer | tslil <tslil@posteo.de> | 2026-08-28 19:37:41 +0100 |
| commit | 77de899d5b1abfabe40371f2f6fa4517ace0e28c (patch) | |
| tree | 078c92cc29467654dfa803f915ca22477bf6cf4e /include/tak.h | |
| parent | 9e926c41c05daae9dd8e6e4af20131d55cf2de03 (diff) | |
Corrected PTN move parsing
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]; |
