public static long Part1() { var root = AreaTraversal <Day15Cell> .Bfs(area, (0, 0), c => c == Day15Cell.Open); var oxygenNode = AreaTraversal <Day15Cell> .FindPosition(MazeGenerator.OxygenSystemPosition, root); return(AreaTraversal <Day15Cell> .DepthOf(oxygenNode)); }
public static long Part2() { var root = AreaTraversal <Day15Cell> .Bfs(area, MazeGenerator.OxygenSystemPosition, c => c == Day15Cell.Open); return(AreaTraversal <Day15Cell> .MaxDepth(root) - 1); }