public IEnumerable <string> SendCommands([FromBody] Command command) { try { var plateau = _parse.ToPlateau(command.Plateau); var rovers = new List <string>(); foreach (var rover in command.Rovers) { var position = _parse.ToRover(rover.Position); var movements = _parse.ToMovemenent(rover.Movement); var result = _squad.Deploy(plateau, position, movements); rovers.Add(_parse.ToString(result)); } return(rovers); } catch (Exception ex) { _logger.LogError("Failed to deploy rover!", ex); return(null); } }
public void Execute() { _squad.Deploy(landingPosition, orientation); }