public void Example1Test() { var map = @" .#..# ..... ##### ....# ...##"; MonitoringStation.CalculateBestStation(map).maxNumberOfVisible.ShouldBe(8); }
public void Day10() { var map = @" .............#..#.#......##........#..# .#...##....#........##.#......#......#. ..#.#.#...#...#...##.#...#............. .....##.................#.....##..#.#.# ......##...#.##......#..#.......#...... ......#.....#....#.#..#..##....#....... ...................##.#..#.....#.....#. #.....#.##.....#...##....#####....#.#.. ..#.#..........#..##.......#.#...#....# ...#.#..#...#......#..........###.#.... ##..##...#.#.......##....#.#..#...##... ..........#.#....#.#.#......#.....#.... ....#.........#..#..##..#.##........#.. ........#......###..............#.#.... ...##.#...#.#.#......#........#........ ......##.#.....#.#.....#..#.....#.#.... ..#....#.###..#...##.#..##............# ...##..#...#.##.#.#....#.#.....#...#..# ......#............#.##..#..#....##.... .#.#.......#..#...###...........#.#.##. ........##........#.#...#.#......##.... .#.#........#......#..........#....#... ...............#...#........##..#.#.... .#......#....#.......#..#......#....... .....#...#.#...#...#..###......#.##.... .#...#..##................##.#......... ..###...#.......#.##.#....#....#....#.# ...#..#.......###.............##.#..... #..##....###.......##........#..#...#.# .#......#...#...#.##......#..#......... #...#.....#......#..##.............#... ...###.........###.###.#.....###.#.#... #......#......#.#..#....#..#.....##.#.. .##....#.....#...#.##..#.#..##.......#. ..#........#.......##.##....#......#... ##............#....#.#.....#........... ........###.............##...#........# #.........#.....#..##.#.#.#..#....#.... ..............##.#.#.#...........#....."; var station = MonitoringStation.CalculateBestStation(map); Console.WriteLine($"Placing laser at {station.bestAsteroid}, where {station.maxNumberOfVisible} asteroids are visible."); Console.WriteLine(MonitoringStation.DoGiantLaserStuff(map, station.bestAsteroid)); }