public void Execute(string commandString) { var commandList = commandParser.Parse(commandString); CommandsInvoke.Assign(commandList); CommandsInvoke.InvokeAll(); }
public CommandCenter(LandingSurface aLandingSurface, ParseCommands aCommandParser, CommandsInvoke aCommandInvoker, IReportComposer aReportComposer) { rovers = new List <MarsRover>(); landingSurface = aLandingSurface; commandParser = aCommandParser; commandInvoker = aCommandInvoker; reportComposer = aReportComposer; commandInvoker.SetLandingSurface(landingSurface); commandInvoker.SetRovers(rovers); }