From 7bd910059cc9eed622301667d6de71eed27c6433 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Ke=C3=9Fler?= Date: Tue, 8 Aug 2023 00:44:50 +0200 Subject: [PATCH] make pace variable signed to detect game states out of pace --- game_state.h | 2 +- main.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/game_state.h b/game_state.h index 3c65771..a0478d2 100644 --- a/game_state.h +++ b/game_state.h @@ -242,7 +242,7 @@ private: size_t _initial_draw_pile_size; // further statistics that we might want to keep track of - uint8_t _pace{}; + int8_t _pace{}; uint8_t _score{}; std::uint64_t _enumerated_states {}; diff --git a/main.cpp b/main.cpp index d1f346a..d74b819 100644 --- a/main.cpp +++ b/main.cpp @@ -74,7 +74,7 @@ void check_games(unsigned num_players, unsigned max_draw_pile_size, unsigned fir file << "Game " << game_id << ": " << chance << std::endl; file << *game << std::endl << std::endl; } - std::cout << "Finished game " << game_id << ": " << chance << std::endl; + std::cout << "Finished game " << game_id << " with draw pile size " << draw_pile_size << ": " << chance << std::endl; total_chance += chance; } @@ -109,7 +109,7 @@ int main(int argc, char *argv[]) { #ifndef NDEBUG test(); #endif - check_games(4, 9); + check_games(3, 10); if(argc == 3) { std::string game (argv[1]); std::string turn (argv[2]);