public override void Puzzle1() { toboggan = new Toboggan(0, 0, 3, 1); int hits = toboggan.Travel(input); Console.WriteLine($"We have hit {hits} trees"); }
public override void Puzzle2() { int hits = 1; List <Toboggan> toboggans = new List <Toboggan>() { new Toboggan(0, 0, 1, 1), new Toboggan(0, 0, 3, 1), new Toboggan(0, 0, 5, 1), new Toboggan(0, 0, 7, 1), new Toboggan(0, 0, 1, 2), }; foreach (Toboggan toboggan in toboggans) { hits *= toboggan.Travel(input); } Console.WriteLine($"We have hit {hits} trees"); }