@@ -14,24 +14,21 @@ import (
14
14
)
15
15
16
16
type TestState struct {
17
- Stage * Stage `yaml:"stage"`
18
- Command * RefCommand `yaml:"command"`
19
- CommandFor * Team `yaml:"commandFor"`
20
- GameEvents []* GameEvent `yaml:"gameEvents"`
21
- StageTimeElapsed * time.Duration `yaml:"stageTimeElapsed"`
22
- StageTimeLeft * time.Duration `yaml:"stageTimeLeft"`
23
- MatchTimeStart * time.Time `yaml:"matchTimeStart"`
24
- MatchDuration * time.Duration `yaml:"matchDuration"`
25
- TeamState map [Team ]* TestTeamInfo `yaml:"teamState"`
26
- Division * config.Division `yaml:"division"`
27
- PlacementPos * Location `yaml:"placementPos"`
28
- AutoContinue * bool `yaml:"autoContinue"`
29
- NextCommand * RefCommand `yaml:"nextCommand"`
30
- NextCommandFor * Team `yaml:"nextCommandFor"`
31
- GameEventBehavior * map [GameEventType ]GameEventBehavior `yaml:"gameEventBehavior"`
32
- GameEventProposals []* GameEventProposal `yaml:"gameEventProposals"`
33
- CurrentActionDeadline * time.Time `yaml:"currentActionDeadline"`
34
- CurrentActionTimeRemaining * time.Duration `yaml:"currentActionTimeRemaining"`
17
+ Stage * Stage `yaml:"stage"`
18
+ Command * RefCommand `yaml:"command"`
19
+ CommandFor * Team `yaml:"commandFor"`
20
+ GameEvents []* GameEvent `yaml:"gameEvents"`
21
+ StageTimeElapsed * time.Duration `yaml:"stageTimeElapsed"`
22
+ StageTimeLeft * time.Duration `yaml:"stageTimeLeft"`
23
+ MatchTimeStart * time.Time `yaml:"matchTimeStart"`
24
+ MatchDuration * time.Duration `yaml:"matchDuration"`
25
+ TeamState map [Team ]* TestTeamInfo `yaml:"teamState"`
26
+ Division * config.Division `yaml:"division"`
27
+ PlacementPos * Location `yaml:"placementPos"`
28
+ NextCommand * RefCommand `yaml:"nextCommand"`
29
+ NextCommandFor * Team `yaml:"nextCommandFor"`
30
+ CurrentActionDeadline * time.Time `yaml:"currentActionDeadline"`
31
+ CurrentActionTimeRemaining * time.Duration `yaml:"currentActionTimeRemaining"`
35
32
}
36
33
37
34
type TestTeamInfo struct {
@@ -208,21 +205,6 @@ func (t *TestState) valid() error {
208
205
if t .NextCommandFor != nil && ! t .NextCommandFor .Valid () {
209
206
return errors .Errorf ("TestState.NextCommandFor has an invalid value: %v" , t .NextCommandFor )
210
207
}
211
- if t .GameEventBehavior != nil {
212
- for gameEventType , gameEventBehavior := range * t .GameEventBehavior {
213
- if ! gameEventType .Valid () {
214
- return errors .Errorf ("TestState.GameEventBehavior has an invalid key: %v" , gameEventType )
215
- }
216
- if ! gameEventBehavior .Valid () {
217
- return errors .Errorf ("TestState.GameEventBehavior[%v] has an invalid value: %v" , gameEventType , gameEventBehavior )
218
- }
219
- }
220
- }
221
- for _ , proposal := range t .GameEventProposals {
222
- if ! proposal .GameEvent .Type .Valid () {
223
- return errors .Errorf ("TestState.GameEventProposals.GameEvent.Type has an invalid value: %v" , proposal .GameEvent .Type )
224
- }
225
- }
226
208
return nil
227
209
}
228
210
0 commit comments