#pragma once #include "mover.h" #include "map.h" class Player : public Mover { private: int score; public: Player(); int GetScore(); void SetScore(int _score); // 根据wall判断玩家是否能按照dir指示的方向前进,若能,Move(dir),并返回true,否则返回false bool PlayerMove(const Map& wall, int dir); // 根据当前位置,判断是否能吃到豆子,若能吃到,增加自己的得分,清除掉被删除的豆子,并返回true bool TryEatBean(Map& bean); bool TryEatGoldBean(Map& goldBean); void EatMonster(); void DrawScore(); };