File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -547,12 +547,14 @@ func (e *Engine) processGameEvent(event *GameEvent) error {
547
547
548
548
if e .State .GameState () != GameStateHalted && ! event .IsContinued () {
549
549
teamInFavor := event .ByTeam ().Opposite ()
550
- if e .State .PlacementPos == nil {
551
- e .SendCommand (CommandStop , "" )
552
- } else if e .State .TeamState [teamInFavor ].CanPlaceBall {
553
- e .SendCommand (CommandBallPlacement , teamInFavor )
554
- } else if e .State .TeamState [teamInFavor .Opposite ()].CanPlaceBall {
555
- e .SendCommand (CommandBallPlacement , teamInFavor .Opposite ())
550
+ if e .State .PlacementPos != nil {
551
+ if e .State .TeamState [teamInFavor ].CanPlaceBall {
552
+ e .SendCommand (CommandBallPlacement , teamInFavor )
553
+ } else if e .State .TeamState [teamInFavor .Opposite ()].CanPlaceBall {
554
+ e .SendCommand (CommandBallPlacement , teamInFavor .Opposite ())
555
+ } else if e .State .GameState () != GameStateStopped {
556
+ e .SendCommand (CommandStop , "" )
557
+ }
556
558
} else if e .State .GameState () != GameStateStopped {
557
559
e .SendCommand (CommandStop , "" )
558
560
}
You can’t perform that action at this time.
0 commit comments