more debugging printouts
This commit is contained in:
@@ -146,6 +146,7 @@ struct AoC {
|
||||
static func main() throws {
|
||||
let maze = try Maze(fromFile: CommandLine.arguments[1])
|
||||
let (graph, pathPairs) = maze.graph()
|
||||
print("maze: \(maze.w)x\(maze.h) intersections: \(graph.count)")
|
||||
let visited = search(graph: graph, start: maze.start)
|
||||
let minCost = maze.ends.compactMap { visited[$0] }.map { $0.0 }.min()!
|
||||
print("minCost: \(minCost)")
|
||||
|
Reference in New Issue
Block a user