public void Move(IEnumerable <Movement> movements, IMars _mars) { foreach (var movement in movements) { movementMethodDictionary[movement].Invoke(_mars); } }
public void SetInMars(IMars _mars, Position _position, CardinalDirection _orientation) { if (_mars.IsValid(_position)) { Position = _position; CardinalDirection = _orientation; return; } }
public CommandCenter(ICommandParser _commandParser, ICommandInvoker _commandInvoker) { robots = new List <IRobot>(); Mars = new Mars(); reportComposer = new OutputParser(); commandParser = _commandParser; commandInvoker = _commandInvoker; commandInvoker.SetDimensionMars(Mars); commandInvoker.SetRobots(robots); }
public MarsRoverApp( IConfiguration config, IInstructionInputParser instructionInputParser, IRoverGrid roverGrid, IMars marse ) { _config = config; _instructionInputParser = instructionInputParser; _roverGrid = roverGrid; _marse = marse; }
private void MovePosition(Position _position, IMars mars) { if (!IsLost) { if (mars.IsValid(_position)) { Position = _position; } else { IsLost = true; } } }
public void SetReceiver(IRobot _robot, IMars _mars) { Robot = _robot; Mars = _mars; }
public void SetReceiver(IMars _mars) { Mars = _mars; }
public MarsDimensionCommand(Dimension _dimension, IMars _mars) { Mars = _mars; Dimension = _dimension; }
public void SetDimensionMars(IMars _mars) { Mars = _mars; }
public Operation(IMars marseRover, IRoverGrid grid, IInstructionInputParser inputParser) { Marse = marseRover; Board = grid; Parser = inputParser; }