public string GetAnswerForPart2() { var slopes = new[] { new { X = 1, Y = 1 }, new { X = 3, Y = 1 }, new { X = 5, Y = 1 }, new { X = 7, Y = 1 }, new { X = 1, Y = 2 }, }; var treeCounts = slopes.Select(slope => (double)Day03.GetAnswerForPart1(this.Input.ParseLines().ToArray(), slope.X, slope.Y)); var productOfTreeCounts = treeCounts.Aggregate((x, y) => x * y); return(productOfTreeCounts.ToString()); }
public string GetAnswerForPart1() { var rows = this.Input.ParseLines().ToArray(); return(Day03.GetAnswerForPart1(rows, 3, 1).ToString()); }