public Rover(int x, int y, char facing, int[] dimentions)
        {
            X      = x;
            Y      = y;
            Facing = facing;

            _facingDirectionIndex = _directions.IndexOf(facing);
            _roverCommandFactory  = new RoverCommandFactory(this, dimentions);
        }
 public RoverCommandFactoryBuilder ForRover(Rover rover)
 {
     _parser = new RoverCommandFactory(rover);
     return(this);
 }
示例#3
0
        private void SetCommands(string commands)
        {
            var commandFactory = new RoverCommandFactory(this);

            commandList = commandFactory.CreateFrom(commands);
        }