Skip to content

Commit b9e4b14

Browse files
committed
Solved day17 part 2
1 parent e8cc546 commit b9e4b14

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ plugins {
44

55
// project meta data
66
group 'de.havox_design.aoc2023'
7-
version '0.16.3'
7+
version '0.16.4'
88

99
// Switch to gradle "all" distribution.
1010
wrapper {

day17/src/main/kotlin/de/havox_design/aoc2023/day17/Day17.kt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,12 @@ class Day17(private var filename: String) {
99
.findPath()
1010

1111
fun solvePart2(): Long =
12-
94L
12+
parseCoodinateMap()
13+
.findPath(
14+
maxConsecutive = 10,
15+
minConsecutive = 4,
16+
minMovedForEnd = 4
17+
)
1318

1419
private fun Map<Coordinate, Int>.findPath(
1520
maxConsecutive: Int = 3, minConsecutive: Int = 0, minMovedForEnd: Int = 0

0 commit comments

Comments
 (0)