-
Notifications
You must be signed in to change notification settings - Fork 0
/
object.h
57 lines (45 loc) · 1.19 KB
/
object.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
46
47
48
49
50
51
52
53
54
55
56
57
#ifndef OBJECT_H
#define OBJECT_H
#include <climits>
#include <iostream>
#include <memory>
enum Color { // Color is an enum to prevent exploiting loopholes (e.g. 2 similar colors considered different)
NIL = INT_MAX, // Empty color
RED = 0xFF0000,
GREEN = 0x00FF00,
BLUE = 0x0000FF,
YELLOW = 0xFFFF00,
CYAN = 0x00FFFF,
MAGENTA = 0xFF00FF,
BLACK = 0,
WHITE = 0xFFFFFF,
ORANGE = 0xFF8000,
GREY = 0x808080,
DARK = 0x404040,
LIGHT = 0x0C0C0C,
// Furries!
SP2 = 0xCEB7FF,
SP1 = 0x8AD8FF
};
class Object {
public:
Color color;
bool isPath; // Is Pathable (false if cut or is symbol cell)
bool isPathOccupied; // Is there a path here
Object() {
isPath = false;
isPathOccupied = false;
color = NIL;
}
std::shared_ptr<Object> clear() {
std::shared_ptr<Object> res = std::shared_ptr<Object>(new Object());
res->isPath = isPath;
res->isPathOccupied = isPathOccupied;
res->color = NIL;
return res;
}
virtual ~Object() {
// std::cout << "!";
}
};
#endif