fojtasd

Untitled

Feb 9th, 2019
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.51 KB | None | 0 0
  1. int main()
  2. {
  3.     bool restart = true;
  4.     char terminace;
  5.     while (restart)
  6.     {
  7.         Setup();
  8.         while (!gameOver)
  9.         {
  10.             Draw();
  11.             Input();
  12.             Logic();
  13.             this_thread::sleep_for(0.1s);
  14.         }
  15.         cout << "Znova? y/n" << endl;
  16.         cin >> terminace;
  17.         if (terminace == 'y')
  18.         {
  19.             restart = true;
  20.         }
  21.         else if(terminace == 'n')
  22.         {
  23.             restart = false;
  24.         }
  25.         else
  26.         {
  27.             cout << "Napsals hovno, asi chces hrat znova." << endl;
  28.             restart = true;
  29.             cin.clear();
  30.             system("pause");
  31.         }
  32.     }
  33.    
  34.     return 0;
  35. }
Advertisement
Add Comment
Please, Sign In to add comment