-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconstant.h
35 lines (33 loc) · 826 Bytes
/
constant.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
//
// Created by xinya on 2024/3/8.
//
#ifndef HARBOR_MANAGER__CONSTANT_H_
#define HARBOR_MANAGER__CONSTANT_H_
#include "vector.h"
#include <array>
#define RED(x) ("\033[31m" x "\033[0m")
const int kInf = 0x3f3f3f3f;
const int kN = 200;
const int kGameDuration = 15000;
const int kGoodsDuration = 1000;
const int kRobotPrice=2000;
const int kShipPrice=8000;
const Vector kDirVec[4] = {{0, 1}, {0, -1}, {-1, 0}, {1, 0}};
enum kDirection {
kStay = -1,
kRight = 0,
kLeft = 1,
kUp = 2,
kDown = 3
};
enum kCellType {
kBanned,
kEmpty,
kWay,
};
const int kTurnBack[4] = {kLeft, kRight, kDown, kUp};
const int kTurnLeft[4] = {kUp, kDown, kLeft, kRight};
const int kTurnRight[4] = {kDown, kUp, kRight, kLeft};
template <typename T>
using Grid = std::array<std::array<T, kN>, kN>;
#endif //HARBOR_MANAGER__CONSTANT_H_