Advertisement
UnlimitedSupply

Rubiks Scrambler

Jun 19th, 2022
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.66 KB | None | 0 0
  1. #include <iostream>
  2. #include <vector>
  3. #include <unistd.h>
  4. using namespace std;
  5.  
  6. bool IncludeBigTurns = true;
  7. int HowManyIn = 50;
  8. int Timer = 0;
  9. string Answer;
  10. vector<string> Turns {
  11.     "R", //0
  12.     "R'", //1
  13.     "U", //2
  14.     "U'", //3
  15.     "M", //4
  16.     "M'", //5
  17.     "D", //6
  18.     "D'", //7
  19.     "L", //8
  20.     "L'", //9
  21.     "F", //10
  22.     "F'", //11
  23.     "B", //12
  24.     "B'", //13
  25.     "r",
  26.     "r'",
  27.     "u",
  28.     "u'",
  29.     "d",
  30.     "d'",
  31.     "l",
  32.     "l'",
  33.     "f",
  34.     "f'",
  35.     "b",
  36.     "b'"
  37. };
  38.  
  39. int main() {
  40.     HowManyIn = HowManyIn - 1; //Dont erase this.
  41.     if (IncludeBigTurns) {
  42.         for (HowManyIn; HowManyIn >= 0; HowManyIn--) {
  43.             int Chance = rand() % Turns.size();
  44.             cout << Turns[Chance] << " ";
  45.         }
  46.     } else {
  47.         for (HowManyIn; HowManyIn >= 0; HowManyIn--) {
  48.             int Chance = rand() % 13;
  49.             cout << Turns[Chance] << " ";
  50.         }
  51.     }
  52.     cout << "Select timer: \n";
  53.     cout << "1m\n";
  54.     cout << "1.5m\n";
  55.     cout << "2m\n";
  56.     cout << "5m\n";
  57.     cin >> Answer;
  58.     if (Answer == "1m") {
  59.         Timer = 60;
  60.     } else if (Answer == "1.5m") {
  61.         Timer = 90;
  62.     } else if (Answer == "2m") {
  63.         Timer = 120;
  64.     } else if (Answer == "5m") {
  65.         Timer = 300;
  66.     } else if (Answer == "SecretMinute") {
  67.         Timer = 1000;
  68.     }
  69.     cout << "5\n";
  70.     sleep(1);
  71.     cout << "4\n";
  72.     sleep(1);
  73.     cout << "3\n";
  74.     sleep(1);
  75.     cout << "2\n";
  76.     sleep(1);
  77.     cout << "1\n";
  78.     sleep(1);
  79.     cout << "GOO\n";
  80.     do {
  81.         cout << Timer << "\n";
  82.         sleep(1);
  83.         Timer = Timer - 1;
  84.     } while (Timer != 0);
  85. }
  86.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement