aboutsummaryrefslogtreecommitdiff
path: root/include/state.c
diff options
context:
space:
mode:
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;