Switch to a direct arraylist definition with the exact memory allocation needed

main
Bryson Zimmerman 11 months ago
parent 9900e8d476
commit 3bc2099dfe

@ -44,7 +44,7 @@ value class Tile(private val value: ULong) {
//Get adjacent tiles for Prim's Algorithm
fun getAdjacentTiles(explored:Boolean): ArrayList<Tile> {
val adj = arrayListOf<Tile>()
val adj = ArrayList<Tile>(4)
val dirs = Directions.ALL
dirs.forEach { dir ->

Loading…
Cancel
Save