aboutsummaryrefslogtreecommitdiff
path: root/src/game/generation_tracker.hpp
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2022-03-23 19:41:31 +0100
committerHampusM <hampus@hampusmat.com>2022-06-13 17:56:57 +0200
commit486ca3846b46dc229e5807968578809766ec1991 (patch)
tree65a4b7a746d6305666af06f8a1975c76244085a7 /src/game/generation_tracker.hpp
parentb8e86ce397dc07320c02f6a5f592c7c6a4421c86 (diff)
feat: implement generations & multithreading
Diffstat (limited to 'src/game/generation_tracker.hpp')
-rw-r--r--src/game/generation_tracker.hpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/game/generation_tracker.hpp b/src/game/generation_tracker.hpp
new file mode 100644
index 0000000..0e59751
--- /dev/null
+++ b/src/game/generation_tracker.hpp
@@ -0,0 +1,22 @@
+#pragma once
+
+#include "interfaces/generation_tracker.hpp"
+
+#include <cstdint>
+
+class GenerationTracker : public IGenerationTracker
+{
+public:
+ explicit GenerationTracker(bool is_paused) noexcept;
+
+ [[nodiscard]] uint32_t get_current_generation() const noexcept override;
+
+ [[nodiscard]] bool get_is_paused() const noexcept override;
+
+ void set_is_paused(bool is_paused) noexcept override;
+
+private:
+ uint32_t _current_generation = 0U;
+
+ bool _is_paused;
+};