diff --git a/2021/src/main/kotlin/aoc/year2021/Day9.kt b/2021/src/main/kotlin/aoc/year2021/Day9.kt index 71f7885..2e68eb3 100644 --- a/2021/src/main/kotlin/aoc/year2021/Day9.kt +++ b/2021/src/main/kotlin/aoc/year2021/Day9.kt @@ -62,7 +62,7 @@ private data class HeightMap(private val heights: List>) { ) } - private fun PointWithValue.surroundingPoints(): List = point.adjacent() + private fun PointWithValue.surroundingPoints(): List = point.adjacentOrthogonal() .mapNotNull { adjacentPoint -> allPoints.find { it.point == adjacentPoint } } private data class PointWithValue(val point: Point, val value: Int)