Example #1
0
        public TerrainType SenseSquare(Direction direction)
        {
            TerrainType terrain = WrappedRover.SenseSquare(direction);

            _actions.Add(new RoverAction(Instruction.Sense, direction));
            return(terrain);
        }
        public TerrainType SenseSquare(Direction direction)
        {
            TerrainType terrain       = WrappedRover.SenseSquare(direction);
            var         updatedCoords = Position + direction;

            if (!updatedCoords.IsNegative)
            {
                TerrainUpdateProgress.Report(new TerrainUpdate(new Position(updatedCoords), terrain));
            }
            StatsUpdateProgress.Report(StatsUpdate);
            return(terrain);
        }