Skip to content

Commit 645a7c3

Browse files
committed
Solved day25 part 2
1 parent afdf257 commit 645a7c3

File tree

6 files changed

+28
-15
lines changed

6 files changed

+28
-15
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.24.4'
7+
version '0.24.5'
88

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

day25/README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,27 @@ Multiplying the sizes of these groups together produces **`54`**.
6161

6262
Find the three wires you need to disconnect in order to divide the components into two separate groups. **What do you
6363
get if you multiply the sizes of these two groups together**?
64+
65+
# Part Two
66+
You climb over weather machines, under giant springs, and narrowly avoid a pile of pipes as you find and disconnect the
67+
three wires.
68+
69+
A moment after you disconnect the last wire, the big red reset button module makes a small ding noise:
70+
```
71+
System overload resolved!
72+
Power required is now 50 stars.
73+
```
74+
Out of the corner of your eye, you notice goggles and a loose-fitting hard hat peeking at you from behind an ultra
75+
crucible. You think you see a faint glow, but before you can investigate, you hear another small ding:
76+
```
77+
Power required is now 49 stars.
78+
79+
Please supply the necessary stars and
80+
push the button to restart the system.
81+
```
82+
You have enough stars to [Push the Big Red Button].
83+
84+
You supply all **fifty stars** and restart global snow production!
85+
86+
As you reach the edge of Snow Island, you can already tell from way up here that everyone will have a white Christmas
87+
this year after all.

day25/src/main/kotlin/de/havox_design/aoc2023/day25/Day25.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ class Day25(private var filename: String) {
1313
splitGroups(getResourceAsText(filename))
1414
.toLong()
1515

16-
fun solvePart2(): Long =
17-
0L
16+
fun solvePart2(): String =
17+
"Merry X-MAS!!!"
1818

1919
private fun splitGroups(input: List<String>): Int {
2020
val graph: Graph<String, DefaultEdge> = SimpleGraph(DefaultEdge::class.java)

day25/src/test/kotlin/de/havox_design/aoc2023/day25/Day25Test.kt

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,11 @@ class Day25Test {
1818
fun testSolvePart1(filename: String, expectedResult: Long) =
1919
Day25(filename).solvePart1().shouldBe(expectedResult)
2020

21-
@ParameterizedTest
22-
@MethodSource("getDataForTestSolvePart2")
23-
fun testSolvePart2(filename: String, expectedResult: Long) =
24-
Day25(filename).solvePart2().shouldBe(expectedResult)
25-
2621
companion object {
2722
@JvmStatic
2823
private fun getDataForTestSolvePart1(): Stream<Arguments> =
2924
Stream.of(
30-
Arguments.of("part1sample.txt", 54L)
31-
)
32-
33-
@JvmStatic
34-
private fun getDataForTestSolvePart2(): Stream<Arguments> =
35-
Stream.of(
36-
Arguments.of("part2sample1.txt", 0L)
25+
Arguments.of("sample.txt", 54L)
3726
)
3827
}
3928
}

day25/src/test/resources/part2sample1.txt

Whitespace-only changes.

0 commit comments

Comments
 (0)