public void Puzzle1_FindBestLocation() { var field = new AsteroidField(Input.Day10Parse(Input.Day10)); var bestLocation = field.OrderByDescending(x => x.VisibleNeighbors).First(); bestLocation.VisibleNeighbors.Should().Be(329); }
public void Examples_FindBestLocation(string data, int expectedX, int expectedY, int expectedNeighbors) { var field = new AsteroidField(Input.Day10Parse(data)); var bestLocation = field.OrderByDescending(x => x.VisibleNeighbors).First(); bestLocation.Location.Should().Be((expectedX, expectedY)); bestLocation.VisibleNeighbors.Should().Be(expectedNeighbors); }