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.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/go/game/range.go b/go/game/range.go
index 83003dfa..c91ad2a8 100644
--- a/go/game/range.go
+++ b/go/game/range.go
@@ -62,10 +62,16 @@ func tilesInRangeFromOrigin(m *Map, origin Position, r int, includeOrigin bool)
return tiles
}
+// TilesInRangeFromOrigin returns all tiles in range r from a position.
+//
+// The position itself is excluded.
func TilesInRangeFromOrigin(m *Map, origin Position, r int) []*Tile {
return tilesInRangeFromOrigin(m, origin, r, false)
}
+// TilesInRange returns all tiles in range r from a Permanent.
+//
+// The permanent's position itself is excluded.
func TilesInRange(m *Map, p Permanent, r int) []*Tile {
return TilesInRangeFromOrigin(m, TileOrContainingPermTile(p).Position, r)
}