public void Execute() { #region Sequence // REPEAT 12 TIMES // 01. Go to position 12 // 02. Scan color and save in sortList // END // 03. Go to Home position #endregion for (int i = 12; i > 0; i--) { var gotoPosition = new RobotMoveToPosition(_robot, _sortRail, (BallPosition) i); var readColor = new RobotReadColor(_robot); gotoPosition.Execute(); readColor.Execute(); _sortRail.SortList[i - 1] = readColor.Result; } var goHome = new RobotMoveToPosition(_robot, _sortRail, BallPosition.Home); goHome.Execute(); }
private void AlgoDone(int leftPointer, int rightPointer) { var goHomeCommand = new RobotMoveToPosition(_robot, _sortRail, BallPosition.Home); goHomeCommand.Execute(); }