forked from jogp10/GongasMaze
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.cpp
38 lines (30 loc) · 814 Bytes
/
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
//T02_G11
#include "jogo.h"
#include <iostream>
#include <thread>
#include <chrono>
int main(){
int menu_choice; // menu option
while(true) {
// Initiate Menu
if(cin.eof()) menu_choice = 0;
else menu_choice = menu();
switch (menu_choice) {
case 1: // Rules of the game
ReadRules();
std::cout << endl;
break;
case 2: // Start the game
play();
std::cout << endl;
break;
case 3: // Leaderboard
leaderboard();
std::cout << endl;
break;
default: // Exit the game
this_thread::sleep_for(chrono::seconds(2));
return 0;
}
}
}