private void ProcessOutput() { if (InputRobots != null && InputRobots.Any()) { foreach (Robot inputRobot in InputRobots) { _processRobotMovement.MoveRobot(MarsGrid, inputRobot); RobotsProcessedOutputs.Add(new RobotOutput(inputRobot)); } OnPropertyChanged(nameof(RobotGeneralInputEnabled)); ((DelegateCommand)ProcessOutputCommand).RaiseCanExecuteChanged(); } }
private void InitializeConditions() { MarsGrid = null; PlainInput.Grid_XCoordinate = string.Empty; PlainInput.Grid_YCoordinate = string.Empty; PlainInput.RobotInstructionList = string.Empty; PlainInput.RobotPosition_Orientation = string.Empty; PlainInput.RobotPosition_XCoordinate = string.Empty; PlainInput.RobotPosition_YCoordinate = string.Empty; RobotId = 0; PositionInput = null; InputRobots.Clear(); RobotsProcessedOutputs.Clear(); LogMessages.Clear(); }
private bool ProcessOutputCanExecuteCommand() { return(InputRobots != null && InputRobots.Any() && RobotPositionInputEnabled && !RobotsProcessedOutputs.Any()); }