-
Notifications
You must be signed in to change notification settings - Fork 0
/
robot.h
32 lines (30 loc) · 803 Bytes
/
robot.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
#pragma once
#include "ui.h"
#include "item.h"
#include "data.h"
#include <vector>
namespace planet{
class Robot{
public:
Robot(std::vector<vectorItems>& ground, data& server);
void move(Direction way);
// void changeServer(data& new_server); // future feature
~Robot(){}
size_t xGround;
size_t yGround;
size_t xServer;
size_t yServer;
size_t id;
std::vector<vectorItems>& ground;
data& server;
protected:
size_t X(size_t x);
size_t Y(size_t y);
private:
void moveUp();
void moveDown();
void moveLeft();
void moveRight();
void confirmServerStep();
};
}