cirno-puzzle/src/entity.h

31 lines
652 B
C
Raw Normal View History

#ifndef ENTITY_H
#define ENTITY_H
using coordinate = unsigned int;
/// Interface representing entity which can be placed on the map
class Entity
{
protected:
coordinate pos_x, pos_y;
public:
2020-03-02 17:22:37 -05:00
Entity(coordinate _x = 0, coordinate _y = 0);
virtual ~Entity() = 0;
/// Get current Entity position
2020-03-02 17:22:37 -05:00
void position(coordinate &x, coordinate &y) const noexcept;
/// Set Entity position explicitly
2020-03-02 17:22:37 -05:00
void setPosition(coordinate x, coordinate y);
/// Get current x of the Entity position
2020-03-02 17:22:37 -05:00
coordinate x() const noexcept;
/// Get current y of the Entity position
2020-03-02 17:22:37 -05:00
coordinate y() const noexcept;
};
#endif // ENTITY_H