-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdatalayer.hh
38 lines (26 loc) · 940 Bytes
/
datalayer.hh
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
//****************************************************************************************
//Author: Hanyu Zhang, Xiaotian Zhang, Runji Hu
//Discription: this file Define a logic layer of playground for robots to run
//****************************************************************************************
#ifndef DATALAYER_HH
#define DATALAYER_HH
#include "Robot.hh"
#include <math.h>
//The class Datalayer makes a logic layer to record robots` locations, radiuses, alert area.
//It is also used for checking collision between robots.
class Datalayer{
private:
int length;
int width;
int **layer;
public:
Datalayer(int ,int);
~Datalayer();
void changeLen(int);
void changeWid(int);
int getLength() const;
int getWidth() const;
void clearData(); //clear everything on datalayer
void loadData(); //paint and robot boundaries on the datalayer
};
#endif // DATALAYER_HH