diff options
| -rw-r--r-- | go/game/targets.go | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/go/game/targets.go b/go/game/targets.go index a7e89740..61cf3436 100644 --- a/go/game/targets.go +++ b/go/game/targets.go @@ -480,9 +480,8 @@ func posFromTileOrPermanent(tileOrPermanent any) Position { } func rangeTargetConstraint(source any, r int) TargetConstraintFunc { - sourcePos := posFromTileOrPermanent(source) - return func(t any) (err error) { + sourcePos := posFromTileOrPermanent(source) targetPos := posFromTileOrPermanent(t) if !IsPositionInRange(sourcePos, targetPos, r) { err = fmt.Errorf("Position %v of target %v not in range %d of source's position %v", |
