Tiles

About

Scenario is two-dimensional array of class.Tile, you can iterate over them with for loop or get tile with indexes. There's plenty of helpfull methods, which make using tiles easier.

Map Coords

Attributes

Methods

Examples

Placing desert in middle of map

>>> size = 8  # grid size
>>> cx = cy = scenario.tiles.width // 2   # center coordinations
>>> grid = scenario.tiles.getArea(cx, cy, cx+size, cy+size)
>>> for tile in grid:
>>>     tile.type = 4