From 522a43d16e812e10ff69747ee916918b4bd29f2f Mon Sep 17 00:00:00 2001 From: jacopograndi Date: Sun, 5 Sep 2021 23:00:42 +0200 Subject: invariant added as 'inv' --- game/gst.h | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'game/gst.h') diff --git a/game/gst.h b/game/gst.h index dc68b31..e86ddc5 100644 --- a/game/gst.h +++ b/game/gst.h @@ -56,13 +56,17 @@ class Inv { std::vector tiles; Ground ground; - private: + Tech* get_tech (int id); + EntityInfo* get_info (std::string name); + EntityInfo* get_info (int id); + bool info_has_ability (EntityInfo* info, std::string name); + std::default_random_engine engine = std::default_random_engine{}; -} +}; class Gst { public: - Gst() { } + Gst(Inv *inv) : inv(inv) { } Inv *inv; @@ -73,10 +77,7 @@ class Gst { int day { 0 }; Player& get_player (int id); - Tech* get_tech (int id); - EntityInfo* get_info (std::string name); - EntityInfo* get_info (int id); - bool info_has_ability (EntityInfo* info, std::string name); + Entity& get_at (int x, int y); std::vector get_cost (EntityInfo *info, Player &player); float get_trade_rate (Player &player); -- cgit v1.2.3-54-g00ecf