public void Resolve() { var map = Map.Parse(File.ReadAllLines("./input/input3.txt")); var toboggan = new Toboggan(map, 3); var squares = toboggan.SlideDown(); squares.Count(s => s == Square.Tree).Should().Be(247); }
public void TobogganSlideDown() { var map = Map.Parse(new[] { ".#", "#." }); var toboggan = new Toboggan(map, 1); var squares = toboggan.SlideDown(); squares.Should().BeEquivalentTo(new[] { Square.Open, Square.Open }); }
public void TobogganSlideDownSlopeOfMultipleRows() { var map = Map.Parse(new[] { ".#", ".#", ".#", ".#", ".#" }); var toboggan = new Toboggan(map, new Slope(1, 2)); var squares = toboggan.SlideDown(); squares.Count().Should().Be(3); squares.Should().BeEquivalentTo(new[] { Square.Open, Square.Tree, Square.Open }); }