public IRobot ExecuteCommand(IRobot rover, string commandText) { ValidateCommand(commandText); robotAction = robotActionResolver.GetRobotAction(commandText); return(robotAction.Excecute(rover)); }
private static void Print(IRobotAction printCommand) { rover = printCommand.Excecute(rover); Console.WriteLine(rover.FormattedString); }