Skip to content

Commit 6dff6e8

Browse files
committed
Uncommented part two, it works!
1 parent 917e6ae commit 6dff6e8

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

2019/18/part-two.js

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
const { input, sampleInputs } = require('./input');
22
const { Maze } = require('./maze');
33

4-
let maze = new Maze(input);
5-
console.log([...maze.keys])
6-
// maze.setupPartTwo();
7-
// let maze = new Maze(sampleInputs[3].maze);
8-
// const [first_entrance] = [...maze.entrances.values()];
4+
let maze = new Maze(input, false);
5+
maze.setupPartTwo();
6+
maze.pathfinders = maze.generatePathfinders();
97

10-
// const start = new Date();
11-
// const paths = maze.getShortestPath(...first_entrance);
12-
// console.log(`Took ${new Date() - start}ms`);
13-
// console.log(paths[0]);
8+
const start = new Date();
9+
const paths = maze.getShortestPath();
10+
console.log(`Took ${new Date() - start}ms`);
11+
console.log(paths[0]);

0 commit comments

Comments
 (0)