#pragma once #include "fsm.hpp" #include "map.hpp" enum class EntityState { START, HUNTING, DEAD }; enum class EntityEvent { GO, HIT }; struct Entity : public DeadSimpleFSM { Point location{0,0}; int hp = 20; int damage = 10; Entity() { } Entity(Point loc) : location(loc) { } // disable copy Entity(Entity &e) = delete; void move(Point loc); void event(EntityEvent ev); // states void START(EntityEvent ev); void HUNTING(EntityEvent ev); void DEAD(EntityEvent ev); };