From 996076cf151a27a7a8d278aa4d15b28cfb196c46 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Sat, 20 Feb 2021 13:04:41 -0500 Subject: Added a randomly wandering Ionia to the map --- src/game.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/game.h') diff --git a/src/game.h b/src/game.h index 9340c65..72dd337 100644 --- a/src/game.h +++ b/src/game.h @@ -8,6 +8,7 @@ #include #include #include +#include #include "sprite.h" #include "map.h" #include "consts.h" @@ -20,7 +21,7 @@ class Renderer; class Game { public: - explicit Game(Renderer& renderer) : font_("../res/font.txt", renderer) {} + Game(Renderer& renderer, std::mt19937& rng) : font_("../res/font.txt", renderer), rng_(&rng) {} Mixer& getMixer() { return mixer_; } @@ -83,6 +84,8 @@ public: const Font& getFont() const { return font_; } + std::mt19937& getRng() { return *rng_; } + private: Mixer mixer_; @@ -97,6 +100,7 @@ private: std::map spritesByAlias_; std::unique_ptr map_; Font font_; + std::mt19937* rng_; }; #endif /* end of include guard: GAME_H_E6F1396E */ -- cgit 1.4.1