aboutsummaryrefslogtreecommitdiff
path: root/game/ground.h
blob: d1a4f347195fa2d8e94fde051f7fc33d46388b2b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#ifndef GROUND_H
#define GROUND_H

#include "entity.h"

class Gst;

class Resource {
    public:
    Resource (int pos, int kind) : pos(pos), kind(kind) {}
   
    enum Type { gold, food };
    
    int pos, kind;
};

class Ground {
    public:
    Ground () {}
    
    int *tiles;
    
    std::vector<Resource> resources;
    
    void build (int sx, int sy);
    
    int sizex;
    int sizey;
    int at (int x, int y);
    std::vector<int> star (int pos);
    std::vector<int> move_area (Gst &gst, Entity &ent);
    std::vector<int> attack_targets (Gst &gst, Entity &ent);
    std::vector<int> heal_targets (Gst &gst, Entity &ent);
    std::vector<int> convert_targets (Gst &gst, Entity &ent);
};

#endif