aboutsummaryrefslogtreecommitdiff
path: root/game/gst.h
diff options
context:
space:
mode:
authorjacopograndi <jak.sk8@hotmail.it>2021-09-06 20:11:36 +0200
committerjacopograndi <jak.sk8@hotmail.it>2021-09-06 20:11:36 +0200
commit411d2f6d6a6e5370d33f0f54b2f2de7147a9d977 (patch)
tree82b631079a3d7226ce6384f695f2e3b213a2c635 /game/gst.h
parent522a43d16e812e10ff69747ee916918b4bd29f2f (diff)
started ai
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);