aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/headers/Tile.hpp
blob: 0fc310533e46af237d511022ae39dc5c0a26c508 (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 class 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