diff options
Diffstat (limited to 'go/game')
| -rw-r--r-- | go/game/state.go | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/go/game/state.go b/go/game/state.go index 6c1182d2..021d88ab 100644 --- a/go/game/state.go +++ b/go/game/state.go @@ -387,12 +387,17 @@ func (s *State) orderTriggeredActions(triggeredActions []*TriggeredAction) []Act p := s.Players[(i+s.ActivePlayer.Id-1)%nPlayers] actions := playerActions[p] + pActions := make([]Action, 0, len(actions)) p.Ctrl.SendNotification(newDeclareTriggeredActionsPrompt(actions)) switch a := p.Ctrl.RecvAction().(type) { case *DeclareTriggeredActionsAction: - pActions := make([]Action, 0, len(a.actions)) - for _, a := range a.actions { + for _, a := range a.actions { // Use the order passed back by the user + pActions = append(pActions, a) + } + orderedActions = append(orderedActions, pActions...) + case *PassPriority: // Support kraken AI always sending PassPriority + for _, a := range actions { // Simply use the order the actions were triggered pActions = append(pActions, a) } orderedActions = append(orderedActions, pActions...) |
