diff options
| author | tslil <tslil@posteo.de> | 2020-12-30 17:30:20 -0500 |
|---|---|---|
| committer | tslil <tslil@posteo.de> | 2026-08-28 19:37:41 +0100 |
| commit | 7b595584975e6a43ab2cd22cab0a16323c9d1c6b (patch) | |
| tree | d83c3a673108cd0efb5b12400fbcba9dbc4aa88b /include | |
| parent | a6308720e8c522c5fe60f74e4acde6d6a03e2dde (diff) | |
Fixed ordering
Diffstat (limited to 'include')
| -rw-r--r-- | include/tak.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/include/tak.h b/include/tak.h index 32e4491..0bedde6 100644 --- a/include/tak.h +++ b/include/tak.h @@ -4,6 +4,13 @@ enum E_RESULT { A_OK, A_ILLEGAL, A_OVERFLOW, PTN_VALID, PTN_INVALID, W_NONE, W_DRAW, W_DRAGON, W_ROAD_WHITE, W_ROAD_BLACK, W_FLAT_WHITE, W_FLAT_BLACK }; +// ------------------------------------------------------------------- +// State management + +enum COLOUR { C_WHITE, C_BLACK }; +enum STONE_VARIANT { STONE_FLAT, STONE_STANDING, STONE_CAPSTONE }; +enum MOVE_DIRECTION { M_UP, M_DOWN, M_LEFT, M_RIGHT }; + typedef uint8_t data_t; typedef uint16_t colour_stack_t; @@ -16,13 +23,6 @@ uint8_t white_flats, black_flats, white_caps, black_caps, turn; void reset_state(const uint8_t new_board_size); void next_turn(void); -// ------------------------------------------------------------------- -// State management - -enum COLOUR { C_WHITE, C_BLACK }; -enum STONE_VARIANT { STONE_FLAT, STONE_STANDING, STONE_CAPSTONE }; -enum MOVE_DIRECTION { M_UP, M_DOWN, M_LEFT, M_RIGHT }; - enum E_RESULT try_place(const int8_t location, const enum COLOUR colour, const enum STONE_VARIANT stone); |
