aboutsummaryrefslogtreecommitdiff
path: root/go/game
diff options
context:
space:
mode:
Diffstat (limited to 'go/game')
-rw-r--r--go/game/targets.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/go/game/targets.go b/go/game/targets.go
index fb393057..58f19dc1 100644
--- a/go/game/targets.go
+++ b/go/game/targets.go
@@ -271,6 +271,16 @@ func (targets *Targets) RequireSelection() bool {
return false
}
+func (targets *Targets) AllowSelection() bool {
+ for _, t := range targets.ts {
+ if t.AllowSelection() {
+ return true
+ }
+ }
+
+ return false
+}
+
func conjunction(constraints ...TargetConstraintFunc) TargetConstraintFunc {
return func(t interface{}) error {
for _, constraint := range constraints {