aboutsummaryrefslogtreecommitdiff
path: root/go/game/state.go
diff options
context:
space:
mode:
Diffstat (limited to 'go/game/state.go')
-rw-r--r--go/game/state.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/go/game/state.go b/go/game/state.go
index 9a76a945..9baaea5f 100644
--- a/go/game/state.go
+++ b/go/game/state.go
@@ -411,6 +411,7 @@ func (s *LocalState) declareAction(a Action) {
}
func (s *LocalState) orderTriggeredActions(triggeredActions []*TriggeredAction) []Action {
+ // Sort triggers by their controller
playerActions := make(map[*Player][]*TriggeredAction)
for _, action := range triggeredActions {
p := action.Controller()
@@ -444,7 +445,7 @@ func (s *LocalState) orderTriggeredActions(triggeredActions []*TriggeredAction)
pActions = append(pActions, a)
}
orderedActions = append(orderedActions, pActions...)
- case *PassPriority: // Support kraken AI always sending PassPriority
+ case nil, *PassPriority: // Support kraken AI always sending PassPriority and mockPlayerControl
for _, a := range actions { // Simply use the order the actions were triggered
pActions = append(pActions, a)
}