aboutsummaryrefslogtreecommitdiff
path: root/go/game/range.go
diff options
context:
space:
mode:
Diffstat (limited to 'go/game/range.go')
-rw-r--r--go/game/range.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/go/game/range.go b/go/game/range.go
index bc50c99b..8b57fb1b 100644
--- a/go/game/range.go
+++ b/go/game/range.go
@@ -10,7 +10,7 @@ func DistanceBetweenPositions(origin, pos Position) int {
ax, ay := math.Abs(x), math.Abs(y)
var abs float64
- if pos.X > pos.Y {
+ if ax > ay {
abs = ax + math.Floor(ay/2)
} else {
abs = ay + math.Floor(ax/2)