aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/headers/Tile.hpp
blob: 88e72165fbd997c909380f103cfe6906e12f8049 (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
#ifndef TILE_HPP
#define TILE_HPP

#include "Actor.hpp"

struct Tile
{
    enum Type
    {
        GRASS, WATER
    };

    const Type type;
    const int x, y;

    Tile(Type _type, int _x, int _y) : type(_type), x(_x), y(_y) {}

    Actor* actor() { return _actor; }
    bool actor(Actor *actor);

    void clearActor() { _actor = nullptr; }

private:
    Actor *_actor = nullptr;
};

#endif