-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPacMan.h
45 lines (27 loc) · 884 Bytes
/
PacMan.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#pragma once
#include <queue>
#include <functional>
#include "Entity.h"
class PacMan : public Entity {
private:
std::queue<Direction> directions;
int eatenDots;
bool dead;
void stop();
void queueDirection(Direction dir);
protected:
void movement() override;
void teleport(int x, int y) override;
bool canMove(Labyrinth &labyrinth) override;
void getSprite(int i) override;
public:
PacMan();
bool render(int &delay, const std::vector<std::unique_ptr<Entity>> &entities, sf::RenderWindow *window,
Labyrinth &labyrinth) override;
bool isScattering() override { return false; };
bool isOutHome() override { return false; };
void setFrightened(bool f) override {};
void set_target(int x, int y) override {};
bool isFrightened() override { return false; }
void key(int code) override;
};