-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvariables.js
90 lines (71 loc) · 2.45 KB
/
variables.js
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
export default {
// CONSTANTS
LAST_TURN: 999,
POS_INF: 2147483647,
NEG_INF: -2147483648,
MIN_DEF_ROBOTS: 40, // minimum number of visible ally prophets before building crusaders
MIN_ATK_ROBOTS: 60, // minimum number of visible ally attackers before deusVulting
MIN_ATK_FUEL: 10000, // minimum amount of fuel before deusVulting
ATTACK_DEPTH: 50, // maximum search depth of navigate when finding path to deusVult
MIN_LAT_DIST: 4, // must be strictly greater than this
DEFENSE_DEPTH: 10, // maximum search depth of navigate() when forming the defensive lattice
NAVIGATION_TIME_LIMIT: 80, // maximum amount of time used in navigate()
ENEMY_PRIORITY: [5, 4, 3, 0, 1, 2],
CASTLE_MIN_DEF: 8, // minimum number of visible ally attackers on defense per castle
CHURCH_DEPTH: 20, // how many moves a pilgrim is willing to make to build a church
CHURCH_MIN_DEF: 8,
CHURCH_MAX_DEF: 20,
SPECS: null,
isLastTurn: false,
creatorID: 0,
creatorPos: null,
myPos: null,
// Map information
passableMap: null,
karbMap: null,
fuelMap: null,
xmax: null,
ymax: null,
rLocs: [], // list of {type, x, y}; type: 0=fuel, 1=karb
// This unit's specs
moveRadius: null,
attackRadius: null, // [min, max]
buildRadius: null,
visionRadius: null,
attackCost: null,
moveCost: null,
maxKarb: null,
maxFuel: null,
unitType: null,
// List of viable [x, y] locations for this unit
moveable: [],
buildable: [],
attackable: [],
allAttackable: [],
visible: [],
connections: {},
firstTurnPoss: {},
// UPDATED EVERY TURN
buildRobot: null,
me: null,
xpos: null,
ypos: null,
teamFuel: null,
teamKarb: null,
// tiles
dangerTiles: null,
// Robots visible to me
visibleRobotMap: null,
commRobots: null, // all visible and radioable (for castles, all team robots, including yourself)
visibleRobots: null, // only in visible range (not including yourself)
visibleEnemyRobots: null, // only in visible range and is an enemy
radioRobots: null, // sent a radio signal (not including yourself)
castleTalkRobots: null, // sent a castle_talk (not including yourself)
// Created information
symmetry: [null, null],
castleLocs: {}, // (castles only, for now) {id: [x, y]} of all friendly castles
baseLocs: {}, // stores Castle and Church locations
baseChange: true, //set to true when the base list is updated (set to false by some pilgrim methods)
fuzzyCost: [],
turnStartTime: null,
};