public void Execute(Command command, ToyRobot toyRobot) { if (_userInteractionService.ClearScreenIfToyRobotIsDeactive(toyRobot)) { return; } toyRobot.RotateRight(); // Perform related action on the Toy Robot _userInteractionService.PrintCommandExecuted(commandName: nameof(Command.Report)); }
public void Execute(Command command, ToyRobot toyRobot) { if (_userInteractionService.ClearScreenIfToyRobotIsDeactive(toyRobot)) { return; } string reportText = toyRobot.Report(); // Perform related action on the Toy Robot _userInteractionService.PrintText($"\n\n{reportText}\n"); }