diff options
author | jacopograndi <jak.sk8@hotmail.it> | 2021-09-05 23:00:42 +0200 |
---|---|---|
committer | jacopograndi <jak.sk8@hotmail.it> | 2021-09-05 23:00:42 +0200 |
commit | 522a43d16e812e10ff69747ee916918b4bd29f2f (patch) | |
tree | 3a9b9cb7a5d103252099d0eabb3c8d6ab8803550 /game/gst.h | |
parent | 728abda9dc6fc8e65c7c0e0240a2e7d61a43a583 (diff) |
invariant added as 'inv'
Diffstat (limited to 'game/gst.h')
-rw-r--r-- | game/gst.h | 15 |
1 files changed, 8 insertions, 7 deletions
@@ -56,13 +56,17 @@ class Inv { std::vector<Tile> 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<float> get_cost (EntityInfo *info, Player &player); float get_trade_rate (Player &player); |