Guest User

Untitled

a guest
Jul 5th, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 2.23 KB | None | 0 0
  1.  private void doTheMoves(List<string> moves)
  2.         {
  3.             for (int i = 0; i < moves.Count; i++)
  4.             {
  5.                 switch (moves[i])
  6.                 {
  7.                     case "Right": MoveRight(); break;
  8.                     case "Right Inverted": MoveRightInverted(); break;
  9.                     case "Left": MoveLeft(); break;
  10.                     case "Left Inverted": MoveLeftInverted(); break;
  11.                     case "Up": MoveUp(); break;
  12.                     case "Up Inverted": MoveUpInverted(); break;
  13.                     case "Down": MoveDown(); break;
  14.                     case "Down Inverted": MoveDownInverted(); break;
  15.                     case "Front": MoveFront(); break;
  16.                     case "Front Inverted": MoveFrontInverted(); break;
  17.                     case "Back": MoveBack(); break;
  18.                     case "Back Inverted": MoveBackInverted(); break;
  19.                     case "Middle(LR) Left": MoveMiddleLRL(); break;
  20.                     case "Middle(LR) Right": MoveMiddleLRLInverted(); break;
  21.                     case "Middle(UD) Up": MoveMiddleUDU(); break;
  22.                     case "Middle(UD) Down": MoveMiddleUDUInverted(); break;
  23.                     case "Middle(FB) Front": MoveMiddleFBF(); break;
  24.                     case "Middle(FB) Back": MoveMiddleFBFInverted(); break;
  25.                     default: break;
  26.                 }
  27.                 if (checkbox_slower.Checked)
  28.                 {
  29.                     //Show the current move
  30.                     label_move.Text = moves[i];
  31.                     label_move.Update();
  32.                     //Show the number of moves
  33.                     label_move_count.Text = "(" + (i + 1).ToString() + "/" + moves.Count.ToString() + ")";
  34.                     label_move_count.Update();
  35.                     //Wait
  36.                     System.Threading.Thread.Sleep(Convert.ToInt32(numeric_delay.Value));
  37.                     //Delete the text (blank) and wait a bit --> If
  38.                     label_move.Text = "";
  39.                     label_move.Update();
  40.                     System.Threading.Thread.Sleep(Convert.ToInt32(numeric_delay.Value/5-20));
  41.                     UpdateCube();
  42.                    
  43.                 }
  44.             }
  45.         }
Advertisement
Add Comment
Please, Sign In to add comment