You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
512 B

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

#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();
};