示例#1
0
        static void QuestionTwo(List <MapRow> fomattedRows)
        {
            int resultOne   = MapRow.CheckSlope(fomattedRows, 1, 1);
            int resultTwo   = MapRow.CheckSlope(fomattedRows, 3, 1);
            int resultThree = MapRow.CheckSlope(fomattedRows, 5, 1);
            int resultFour  = MapRow.CheckSlope(fomattedRows, 7, 1);
            int resultFive  = MapRow.CheckSlope(fomattedRows, 1, 2);

            long result =
                Convert.ToInt64(resultOne)
                * Convert.ToInt64(resultTwo)
                * Convert.ToInt64(resultThree)
                * Convert.ToInt64(resultFour)
                * Convert.ToInt64(resultFive)
            ;

            Console.WriteLine("Tree count is: {0}.", result);
        }
示例#2
0
        static void QuestionOne(List <MapRow> fomattedRows)
        {
            int result = MapRow.CheckSlope(fomattedRows, 3, 1);

            Console.WriteLine("Question one tree count is: {0}.", result);
        }