aboutsummaryrefslogtreecommitdiff
path: root/include/state.h
diff options
context:
space:
mode:
authortslil <tslil@posteo.de>2020-12-28 20:56:46 -0500
committertslil <tslil@posteo.de>2026-08-28 19:37:41 +0100
commitfd22e4cf3198c1e63cf26dd5fdce588a1e969ac1 (patch)
tree363215345250b1f0aa223ce97671589fa2837a0f /include/state.h
parentf706a6a0546400cb6a1925f25dc010ffce2afd49 (diff)
Started on PTN stuff
Diffstat (limited to 'include/state.h')
-rw-r--r--include/state.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/include/state.h b/include/state.h
new file mode 100644
index 0000000..428a998
--- /dev/null
+++ b/include/state.h
@@ -0,0 +1,24 @@
+#include <stdint.h>
+#include "enums.h"
+
+static uint8_t board_size = 5;
+
+typedef uint16_t colour_stack_t;
+typedef uint8_t data_t;
+
+static colour_stack_t colours[36];
+static data_t celldat[36];
+static uint8_t white_flats, black_flats, white_caps, black_caps, turn;
+
+void reset_game(void);
+
+enum ACTION_RESULT
+try_place(const int8_t location, const enum COLOUR colour,
+ const enum STONE_VARIANT stone);
+
+enum ACTION_RESULT
+try_move(const int8_t location, const enum MOVE_DIRECTION direction,
+ const uint8_t steps, const uint8_t drops[5]);
+
+enum WIN_RESULT
+check_win(const enum COLOUR colour);