#pragma once #include "mover.h" #include "player.h" #include "map.h" class Monster : public Mover { private: int status; public: Monster(); int GetStatus(); void SetStatus(int _status); // 如果monster成功打败了player,返回true,否则为false(包括没遇见player、被player打败) bool TryEatPlayer(Player player); // 怪物移动时,不仅要选择适当的移动策略,还要注意恢复绘制走过的bean和goldBean void MonsterMove(const Map& wall,Player player, const Map& bean, const Map& goldBean); // 追逐玩家 int Chase(const Map& wall, Player player); // 逃避玩家 int Escape(const Map& wall, Player player); // 等待重生 int WaitingBorn(const Map& wall); };