-
Notifications
You must be signed in to change notification settings - Fork 0
/
sapper.h
34 lines (31 loc) · 844 Bytes
/
sapper.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
#pragma once
#include <vector>
#include "robot.h"
#include "data.h"
#include "item.h"
namespace planet{
class Sapper: public Robot{
public:
Sapper(std::vector<vectorItems>& ground, planet::data& server);
void func();
void on();
void off();
void changeMode();
private:
std::vector<Direction> way;
void work();
void goInRandWay();
Direction randWay();
bool isOn = true;
};
class vectorS: public std::vector<Sapper>{
public:
vectorS(std::vector<vectorItems>& ground, planet::data& server) :
ground(ground), server(server){}
void cmd(char* context);
void refresh();
private:
std::vector<vectorItems>& ground;
planet::data& server;
};
}