Manages map data as the single access point between GameState and the rest of the engine. All tile queries, neighbor lookups, edge tile access, and spatial operations should flow through here rather than touching state directly.
Generates and stores the tile grid from settings. Called by initializers at the start of a new session in place of setting tiles directly on state.
Returns the tile at (x, y), or null if out of bounds or on a null cell.
Returns tiles in one or more rings around (x, y).
getTileRing(x, y, 3) - ring 3 only getTileRing(x, y, 3, 2) - rings 2 and 3 getTileRing(x, y, 3, 1) - rings 1, 2, and 3 getTileRing(x, y, 3, 0) - center tile + rings 1, 2, and 3
start is clamped to [0, ring]. Omitting it returns only the outer ring.
Returns all tiles at exactly ring distance from (x, y) using cube coordinate math. Starts at the top-left position and walks clockwise. Called by getTileRing.
Returns the set of tiles on the outer perimeter of the map.
Caches all tiles on the outer perimeter of the map. Used for bot spawn placement.
Order here matters and is explicit as it maps to the UI.TILE.NEIGHBORS mapping.