Ejemplo n.º 1
0
        public override void ReadInput()
        {
            var path  = PuzzleUtils.PuzzleInputsPath;
            var input = FileReader.ReadFile(path, inputFileileName, fileExt);

            inputData = new MapDay3(input, 1, 3);
        }
Ejemplo n.º 2
0
        public int GetNumberOfTreesInAway(MapDay3 map)
        {
            var numberOfTrees = 0;

            while (!map.DidLeftMap())
            {
                if (map.IsAtTree())
                {
                    numberOfTrees++;
                }

                map.Move();
            }
            return(numberOfTrees);
        }