public void Start() { _userInteractionByTextService.PrintTextCommandsMenu(); while (true) { _userInteractionByTextService.PrintText("=>"); try { _commandTextExecutor.Execute(commandText: _userInteractionByTextService.GetTextLine(), toyRobot: _toyRobot); } catch (NullReferenceException) { // ignored } } }
public void Execute(string commandText, ToyRobot toyRobot) { _userInteractionByTextService.PrintText($" {toyRobot.Report()}\n"); }