Module tilemap

Types

Tilemap[T] = ref object
  chunk_size: Size
  chunks: Table[Point, Chunk]
  generator: Generator[T]

Procs

proc newTilemap[T](chunk_size: Size; generator: Generator[T]): Tilemap[T]
proc makeChunk[T](map: Tilemap[T]; pos: Point; size: Size): Chunk
proc chunkPosition[Tilemap](tm: Tilemap; x, y: int): Point
proc getTile[Tilemap](tm: Tilemap; x, y: int): Tile