-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
executable file
·59 lines (57 loc) · 2.04 KB
/
main.cpp
File metadata and controls
executable file
·59 lines (57 loc) · 2.04 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#include "grafica.h"
int main(int argc, char **argv) {
Grafica *game = nullptr;
input user_in;
do {
delete game;
game = new Grafica(600);
game->res_menu(user_in);
delete game;
switch (user_in) {
case R_600:
game = new Grafica(600);
break;
case R_800:
game = new Grafica(800);
break;
case R_1000:
game = new Grafica(1000);
break;
//case R_FULL: game = new Grafica(); break;
default:
break;
}
do {
game->main_menu(user_in);
if (user_in == PLAY_GAME) {
do {
game->level_menu(user_in);
if (user_in == MAIN_MENU) break;
switch (user_in) {
case MAP_1:
game->start_game("/Users/salvatore/Google Drive/Unical/Corsi/C++/Progetto PO/map1.txt", user_in);
break;
case MAP_2:
game->start_game("/Users/salvatore/Google Drive/Unical/Corsi/C++/Progetto PO/map2.txt", user_in);
break;
case MAP_3:
game->start_game("map3.txt", user_in);
break;
case MAP_4:
game->start_game("map4.txt", user_in);
break;
case MAP_5:
game->start_game("map5.txt", user_in);
break;
default:
break;
}
if (user_in == L_COMPLETE) game->end_game_menu(user_in);
} while (user_in == PLAY_AGAIN);
} else if (user_in == QUIT_GAME) return 0;
else break;
} while (user_in == MAIN_MENU);
} while (user_in == CHANGE_RES);
delete game;
return 0;
}