示例#1
0
        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();
            }
        }
示例#2
0
        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();
        }
示例#3
0
 private bool ProcessOutputCanExecuteCommand()
 {
     return(InputRobots != null && InputRobots.Any() && RobotPositionInputEnabled && !RobotsProcessedOutputs.Any());
 }