-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrobot.h
More file actions
37 lines (27 loc) · 664 Bytes
/
robot.h
File metadata and controls
37 lines (27 loc) · 664 Bytes
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
#ifndef ROBOT_H
#define ROBOT_H
#include <vector>
#include <string>
#include "pge/olcPixelGameEngine.h"
#include "block.h"
#include "map.h"
#include "spritemanager.h"
#include "programmableblock.h"
class RobotGame;
enum class SIDE {UP = 0, RIGHT = 1, DOWN = 2, LEFT = 3};
class Robot
{
private:
Map* map;
SpriteManager* sm;
RobotGame* game;
bool CanMove(olc::vi2d pos);
public:
olc::vi2d pos;
Robot(RobotGame* game, Map* map, SpriteManager* sm, olc::vi2d pos) : game(game), map(map), sm(sm), pos(pos) {}
bool Move(SIDE side);
bool PickUp();
bool Drop();
std::vector<std::string> RadarQuery();
};
#endif // ROBOT_H