From dfbdaf5c7ca72da16f8d9cb9c48c4e735d421632 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Tue, 22 Jul 2025 11:07:39 -0400 Subject: fix incorrect range calculation --- go/game/range.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'go/game/range.go') 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) -- cgit v1.2.3