Skip to content

Commit 1a7bf6d

Browse files
committed
feat: debug day 16 input
1 parent a29691d commit 1a7bf6d

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/main/java/com/adventofcode/flashk/day16/ReindeerMaze.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,9 @@ private long dijkstra(Tile start) {
7070

7171
// Initialize start tile
7272
start.setScore(0);
73-
start.setDirection(Vector2.right());
73+
if(start.getDirection() == null) {
74+
start.setDirection(Vector2.right());
75+
}
7476

7577
// Execute dijkstra
7678
PriorityQueue<Tile> tiles = new PriorityQueue<>();
@@ -171,14 +173,14 @@ public long solveB(){
171173
if(adjacentScore == score) {
172174
fillPath(adjacent, endTile);
173175
fillPath(adjacent, startTile);
174-
paint();
176+
175177
System.out.println();
176178
}
177179
}
178180
}
179181
// Pasada 2, buscamos caminos alternativos en cada una de las intersecciones.
180182

181-
//paint();
183+
paint();
182184
return countPathTiles();
183185
}
184186

src/test/java/com/adventofcode/flashk/day16/Day16Test.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ public void testSolvePart2Input() {
190190
System.out.println("Solution: "+reindeerMaze.solveB());
191191

192192
// 512 -> too low
193-
193+
194194
assertEquals(0L,0L);
195195

196196
}

0 commit comments

Comments
 (0)