Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- #include <cstdio>
- #include <cstdlib>
- #include <ctime>
- #include "iodos.h"
- void clear();
- int main()
- {
- dos_console();
- clear();
- char choice;
- srand(time(NULL));
- const int antal = 17;
- std::string gameModes[antal] = { "Team Deathmatch", "Domination", "Ground War", "Demolition", "Sabotage", "Headquarters Pro", "Search and Destroy", "Barebones Pro", "Team Tactical",
- "Hardcore Ricochet: SD", "Hardcore Team Deathmatch", "3rd Person Team Tactical", "Team Deathmatch Express", "Objective Barebones Pro",
- "Hardcore Ricochet: HQ Pro", "Capture the Flag", "Hardcore Mosh Pit"};
- while (true) {
- int random = (rand() % antal);
- std::cout << "Slumpat gamemode: " << gameModes[random] << std::endl;
- std::cout << "Dåligt resultat? \nVill du försöka igen? (y/n): ";
- std::cin >> choice;
- if (choice == 'y') {
- clear();
- } else {
- break;
- }
- }
- return 0;
- }
- void clear() {
- for (int i = 0; i < 100; i++) {
- std::cout << std::endl;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement