Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int main()
- {
- bool restart = true;
- char terminace;
- while (restart)
- {
- Setup();
- while (!gameOver)
- {
- Draw();
- Input();
- Logic();
- this_thread::sleep_for(0.1s);
- }
- cout << "Znova? y/n" << endl;
- cin >> terminace;
- if (terminace == 'y')
- {
- restart = true;
- }
- else if(terminace == 'n')
- {
- restart = false;
- }
- else
- {
- cout << "Napsals hovno, asi chces hrat znova." << endl;
- restart = true;
- cin.clear();
- system("pause");
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment