aboutsummaryrefslogtreecommitdiff
path: root/go/game/state.go
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fischer@muhq.space>2025-09-08 15:38:07 +0200
committerFlorian Fischer <florian.fischer@muhq.space>2025-09-08 15:41:45 +0200
commita3ca136cd776ff0089dc33e401d1fc474dc17138 (patch)
tree1968a8ff318c7f021e2cc94df5a057eeee39b099 /go/game/state.go
parentee605fa7fa48803756b0c3216afc4bd692ec144a (diff)
downloadmuhqs-game-a3ca136cd776ff0089dc33e401d1fc474dc17138.tar.gz
muhqs-game-a3ca136cd776ff0089dc33e401d1fc474dc17138.zip
support explicitly winning and implement Approach Supremacy!
Diffstat (limited to 'go/game/state.go')
-rw-r--r--go/game/state.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/go/game/state.go b/go/game/state.go
index 9baaea5f..a9c2f638 100644
--- a/go/game/state.go
+++ b/go/game/state.go
@@ -410,6 +410,10 @@ func (s *LocalState) declareAction(a Action) {
}
}
+func (s *LocalState) counterAction(a Action) {
+ s.stack.remove(a)
+}
+
func (s *LocalState) orderTriggeredActions(triggeredActions []*TriggeredAction) []Action {
// Sort triggers by their controller
playerActions := make(map[*Player][]*TriggeredAction)