From e0021112e98639baeee0aae3a483bb725cc99d57 Mon Sep 17 00:00:00 2001 From: HampusM Date: Sun, 12 Jun 2022 14:26:04 +0200 Subject: refactor: clarify generation speed in statusline --- src/game/game.hpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/game/game.hpp') diff --git a/src/game/game.hpp b/src/game/game.hpp index abee6ec..09a9ee0 100644 --- a/src/game/game.hpp +++ b/src/game/game.hpp @@ -23,10 +23,11 @@ #include #include -constexpr auto DEFAULT_MIN_TIME_SINCE_LAST_GEN_MILLIS = 200; +constexpr auto DEFAULT_GENERATIONS_PER_SECOND = 5L; -constexpr auto MIN_TIME_SINCE_LAST_GEN_INCREMENT = 50; -constexpr auto MIN_TIME_SINCE_LAST_GEN_DECREMENT = 50; +constexpr auto MAXIMUM_GENERATIONS_PER_SECOND = 512L; + +constexpr auto MILLIS_IN_SECOND = 1000; constexpr auto CURSOR_FALLBACK_POS_X = 10; constexpr auto CURSOR_FALLBACK_POS_Y = 10; @@ -92,7 +93,7 @@ private: std::chrono::system_clock::time_point _last_gen_update_time; - int32_t _min_time_since_last_gen_millis = DEFAULT_MIN_TIME_SINCE_LAST_GEN_MILLIS; + int64_t _generations_per_second = DEFAULT_GENERATIONS_PER_SECOND; std::list _living_cell_positions; -- cgit v1.2.3-18-g5258