public IRobot ExecuteCommand(IRobot rover, string commandText) { ValidateCommand(commandText); robotAction = robotActionResolver.GetRobotAction(commandText); return(robotAction.Excecute(rover)); }
private static void Initialize(IRobotActionResolver robotActionResolver) { var initailizeCommand = robotActionResolver.GetRobotAction(((char)CommandEnum.Initialize).ToString()); rover = initailizeCommand.Excecute(rover); }