summaryrefslogtreecommitdiff
path: root/include/state.c
diff options
context:
space:
mode:
authortslil <tslil@posteo.de>2020-12-29 18:55:06 -0500
committertslil <tslil@posteo.de>2020-12-29 18:55:06 -0500
commit2cd6206fdf56e9c1cc4da0fb66c7e42efd14e18d (patch)
tree105efe213f5d69eaa8d9a40531a4ccb72a1c793e /include/state.c
parente4c90159344a5717fab873b9a5adb92cc801df23 (diff)
PTN code looks correct, minor tweaks and header guards
Diffstat (limited to 'include/state.c')
-rw-r--r--include/state.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/include/state.c b/include/state.c
index 1505881..3708792 100644
--- a/include/state.c
+++ b/include/state.c
@@ -18,14 +18,16 @@
// -------------------------------------------------------------------
// Game management
-void reset_game() {
- if (board_size == 6) {
+void reset_state(const uint8_t new_board_size) {
+ if (new_board_size == 6) {
+ board_size = 6;
white_flats = 30; black_flats = 30;
} else {
board_size = 5;
white_flats = 21; black_flats = 21;
}
- white_caps = 1; black_caps = 1;
+ white_caps = 1;
+ black_caps = 1;
turn = 0;