aboutsummaryrefslogtreecommitdiff
path: root/game/gst.h
diff options
context:
space:
mode:
Diffstat (limited to 'game/gst.h')
-rw-r--r--game/gst.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/game/gst.h b/game/gst.h
index e86ddc5..376026e 100644
--- a/game/gst.h
+++ b/game/gst.h
@@ -68,11 +68,20 @@ class Gst {
public:
Gst(Inv *inv) : inv(inv) { }
+ // copy constructor
+ Gst (const Gst& rhs) {
+ inv = rhs.inv; entities = rhs.entities; players = rhs.players;
+ turn = rhs.turn; day = rhs.day;
+ }
+ Gst& operator=(const Gst& rhs) {
+ inv = rhs.inv; entities = rhs.entities; players = rhs.players;
+ turn = rhs.turn; day = rhs.day;
+ };
+
Inv *inv;
std::vector<Entity> entities;
std::vector<Player> players;
-
int turn { 0 };
int day { 0 };
@@ -97,6 +106,8 @@ class Gst {
void heal (Entity &atk, Entity &def);
void convert (Entity &atk, Entity &def);
+ int get_nearest_enemy (Entity &ent, int &mindist);
+
std::vector<int> get_possible_trains (Entity &ent);
std::vector<int> get_possible_builds (Entity &ent);