Пример #1
0
        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));
        }
Пример #2
0
        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");
        }