Skip to content

Commit

Permalink
Fix 2021 day 9
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulWoitaschek committed Dec 12, 2024
1 parent 1582c56 commit c9cd779
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion 2021/src/main/kotlin/aoc/year2021/Day9.kt
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ private data class HeightMap(private val heights: List<List<Int>>) {
)
}

private fun PointWithValue.surroundingPoints(): List<PointWithValue> = point.adjacent()
private fun PointWithValue.surroundingPoints(): List<PointWithValue> = point.adjacentOrthogonal()
.mapNotNull { adjacentPoint -> allPoints.find { it.point == adjacentPoint } }

private data class PointWithValue(val point: Point, val value: Int)
Expand Down

0 comments on commit c9cd779

Please sign in to comment.