From 3bc2099dfe4272fe287fb97bcdc12d626a2434ce Mon Sep 17 00:00:00 2001 From: Bryson Zimmerman Date: Sun, 17 Nov 2024 08:38:44 -0500 Subject: [PATCH] Switch to a direct arraylist definition with the exact memory allocation needed --- src/main/kotlin/data/Tile.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/kotlin/data/Tile.kt b/src/main/kotlin/data/Tile.kt index 77c0689..03580a3 100644 --- a/src/main/kotlin/data/Tile.kt +++ b/src/main/kotlin/data/Tile.kt @@ -44,7 +44,7 @@ value class Tile(private val value: ULong) { //Get adjacent tiles for Prim's Algorithm fun getAdjacentTiles(explored:Boolean): ArrayList { - val adj = arrayListOf() + val adj = ArrayList(4) val dirs = Directions.ALL dirs.forEach { dir ->