From ed7b03e6318fc0ea7254218631bfdf17ee7146a5 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Thu, 24 Jul 2025 17:35:20 -0400 Subject: reset an action's targets after resolving it --- go/game/stack.go | 2 +- go/game/state.go | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/go/game/stack.go b/go/game/stack.go index 62783bf2..1ab4ccf8 100644 --- a/go/game/stack.go +++ b/go/game/stack.go @@ -32,7 +32,7 @@ func (s *Stack) pop() { err := s.gameState.ValidateAction(a) if err == nil { - a.resolve(s.gameState) + s.gameState.ResolveAction(a) } log.Println("Resolved", a, err) diff --git a/go/game/state.go b/go/game/state.go index abad79a7..d16bd51d 100644 --- a/go/game/state.go +++ b/go/game/state.go @@ -885,6 +885,8 @@ func (s *LocalState) endOfTurn() []*Player { // ResolveAction resolves an action without using the stack. func (s *LocalState) ResolveAction(a Action) { a.resolve(s) + // Clear selections to make the acrion reusable + a.Targets().ClearSelections() } func (s *LocalState) SetPhase(p PhaseType) { -- cgit v1.2.3