public void SolvePart2() { var input = System.IO.File.ReadAllLines("../../../input/day_10.txt"); AsteroidMap map = new AsteroidMap(input); map.LoadAsteroidsPerAngle(new Point(23, 29)); var p = AsteroidBlaster.BlastAsteroids(map.AsteroidsPerAngle, 200); int result = (p.x * 100) + p.y; Assert.Equal(1110, result); }
public void Part5() { string[] input = new string[] { ".#..##.###...#######", "##.############..##.", ".#.######.########.#", ".###.#######.####.#.", "#####.##.#.##.###.##", "..#####..#.#########", "####################", "#.####....###.#.#.##", "##.#################", "#####.##.###..####..", "..######..##.#######", "####.##.####...##..#", ".#####..#.######.###", "##...#.##########...", "#.##########.#######", ".####.#.###.###.#.##", "....##.##.###..#####", ".#.#.###########.###", "#.#.#.#####.####.###", "###.##.####.##.#..##" }; var map = new AsteroidMap(input); int visible = map.CountVisibleAsteroids(new Point(11, 13)); var p = AsteroidBlaster.BlastAsteroids(map.AsteroidsPerAngle, 200); Assert.Equal(210, visible); Assert.Equal(8, p.x); Assert.Equal(2, p.y); }