public void Execute() { if (this.MarsRoverMissionState != MarsRoverMissionState.CommandsInitialized) { throw new MarsDomainModelException("Commands cannot be executed before they are initialized."); } commandInvoker.Execute(commandsOfRowers); this.MarsRoverMissionState = MarsRoverMissionState.Completed; }
public void LoadsRoversOfCommands(string arguments) { commandsOfRowers = roverCommandParser.Parse(arguments); this.MarsRoverMissionState = MarsRoverMissionState.CommandsInitialized; }