-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNative.hpp
executable file
·55 lines (47 loc) · 907 Bytes
/
Native.hpp
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
#pragma once
#include <cstring>
#include <bit>
char* To_hex(int intToHex, char* str = new char[9], int count = 0){
const char heximals[17] = "0123456789ABCDEF";
int result = (int)intToHex/16;
int remainder = (int)intToHex%16;
count += 1;
if (result >= 1 or count<8){
return strncat(To_hex(result, str, count), &heximals[remainder], 1);
}
strncat(str, &heximals[remainder], 1);
return str;
}
class Position{
public:
int y;
int x;
Position(int iy, int ix){
y = iy,x = ix;
}
};
enum Cardinals{
e = 0,
sE = 60,
sW = 120,
w = 180,
nW = 240,
nE = 300
};
enum Color : bool{
Red = true,
Black = false
};
enum LinkerParam{
PolarNord = 1,
PolarSud = 2,
Normal = 0
};
enum Way : bool{
Left = true,
Right = false
};
enum Sibling : int8_t{
Minor = 0,
Major = 1
};