data class BlockCoordinate
The main coordinate system used in this game. Everything is on an X-Y grid and we use this all over the place.
BlockCoordinate(x: Int, y: Int)
The main coordinate system used in this game. Everything is on an X-Y grid and we use this all over the place. |
val x: Int |
|
val y: Int |
fun circle(radius: Int = 1): List<BlockCoordinate> |
|
fun distanceTo(otherCoordinate: BlockCoordinate): Double |
|
fun fuzz(): BlockCoordinate
Used when we want to place something at a coordinate, but not exactly. It returns a coordinate as far away as MAX_BUILDING_SIZE |
|
fun neighbors(radius: Int = 1): List<BlockCoordinate> |
|
fun plus(otherCoordinate: BlockCoordinate): BlockCoordinate |
fun iterate(from: BlockCoordinate, to: BlockCoordinate, callback: (BlockCoordinate) -> Unit): Unit
Used to call a function on rectangle of BlockCoordinates |