forked from serge-web/serge
-
Notifications
You must be signed in to change notification settings - Fork 0
/
enums.ts
171 lines (156 loc) · 4.12 KB
/
enums.ts
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
/**
* list the possible phases in a wargame
* TODO: the concept of phase isn't restricted to the mapping component. It should be declared higher up the tree
*/
export enum Phase {
/* players are planning their next turn
*/
Planning = 'planning',
/** umpire is resolving planned turns */
Adjudication = 'adjudication'
}
/** TODO: remove this
* Temporary classifier for which dataset is in use
*/
export enum Domain {
ATLANTIC = 'Atlantic',
GULF = 'Gulf'
}
/** increasing permissions in a collaborative editing channel
*/
export enum CollaborativePermission {
/** can */
CannotCollaborate,
CanEdit,
CanSubmitForReview,
CanApprove,
CanRelease,
CanUnClaim
}
/** the initial state for new messages in a collab edit channel */
export enum InitialStates {
PENDING_REVIEW = 'PENDING_REVIEW',
UNALLOCATED = 'UNALLOCATED'
}
/** types of special channel */
export enum SpecialChannelTypes {
CHANNEL_MAPPING = 'mapping',
CHANNEL_COLLAB = 'collab',
CHANNEL_CHAT = 'chat'
}
/** types of extra column to be shown in collab editing */
export enum SpecialChannelColumns {
LOCATION = 'location'
}
/** General terrain type. More relaxed than
* cell.terrain. Used for determining
* achievable cells
*/
export enum Terrain {
LAND = 'land',
SEA = 'sea'
}
/** who is required to give asset an initial location */
export enum LaydownTypes {
/** the umpire (game designer) can position asset */
UmpireLaydown = 'Umpire laydown',
/** the player controlling the asset can position it */
ForceLaydown = 'Force laydown',
Fixed = 'Fixed'
}
/** the phases a v3 collaborative message goes through before
* being approved to send
*/
export enum CollaborativeMessageStates {
/**
* message is waiting to be allocated to owner
*/
Unallocated = 'Unallocated',
/**
* non collab-editing (e.g. RFI) document being edited
* //TODO: remove this when we retire RFI status board.
*/
InProgress = 'In progress',
/**
* owner finished editing, waiting for review
*/
PendingReview = 'Pending review',
/**
* approved and released
*/
Released = 'Released',
/**
* document cancelled
*/
Closed = 'Closed',
}
/** the commands that can be appled to a collaborative message
*/
export enum CollaborativeMessageCommands {
SendForReview = 'Send for review',
TakeOwnership = 'Take ownership',
ReOpen = 'Re-open',
Close = 'Close',
Release = 'Release',
RequestChanges = 'Request changes'
}
/** the ways in which turn numbers may be displayed */
export enum TurnFormats {
// 0, 1, 2, 3
Natural = 'Natural',
// 0.1, 0.2, 1.1, 1.2
TurnPairNumbers = 'Turn-Pair-Numbers',
// 0.a, 0.b, 1.a, 1.b
TurnPairLetters = 'Turn-Pair-Letters'
}
/** the phases of an asset that is
* available for movement by a player during
* force laydown
*
*/
export enum LaydownPhases {
// we're not in laydown phase
NotInLaydown = 'not-in-laydown',
// can't be moved
Immobile = 'Immobile',
// can be moved, but hasn'd
Unmoved = 'Unmoved',
// has moved
Moved = 'Moved'
}
/**
* the possible states for a planned route
*/
export enum PlanningStates {
/** umpire is planning steps */
Planning = 'planning',
/** umpire has planned steps, but not saved */
Planned = 'planned',
/** accept/reject decision is pending */
Pending = 'pending',
/** umpire has rejected planned route */
Rejected = 'rejected',
/** umpire has saved route */
Saved = 'saved'
}
/**
* the possible actions that can be applied to a route
*/
export enum PlanningCommands {
/** umpire is happy with player route */
Accept = 'accept',
/** umpire wants to replace player route */
Reject = 'reject',
/** umpire wants to forget changes, and go back to player route */
Revert = 'revert',
/** umpire has chosen state/speed, and wants to plan the route */
PlanRoute = 'plan-route',
/** umpire has planned the turn */
TurnPlanned = 'turn-planned',
/** umpire is happy with current route */
Save = 'save',
/** umpire instead of dragging the pin, umpire wants to go back to choosing state/speed */
ClearRoute = 'clear-route',
/** umpire wants to revert to player's route, but still modify it */
Cancel = 'cancel',
}