-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgame.cpp
More file actions
62 lines (50 loc) · 1.16 KB
/
Copy pathgame.cpp
File metadata and controls
62 lines (50 loc) · 1.16 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
60
61
62
#include "class.h"
using namespace std;
int main(){
game g;
ifstream in("all_scores.txt");
int a;
while (in >> a){
g.max_score=max(a,g.max_score);
g.last_score=a;
}
in.close();
srand(time(NULL));
initscr();
start_color();
while (1){
printw("%s","2048 MENYU\n");
printw("%s","1. Yangi o'yin\n");
printw("%s","2. TOP 10\n");
printw("%s","3. Yordam\n");
printw("%s","4. Muallif haqida\n");
printw("%s","5. Chiqish\n");
printw("%s","Tanlash uchun mos raqam tugmachasini bosing.\n");
refresh();
char c=getchar();
switch (c){
case '1':
g.new_game();
g.game_process();
break;
case '2':
g.scoreboard();
break;
case '3':
g.help();
break;
case '4':
g.about();
break;
case '5':
refresh();
endwin();
return 0;
}
clear();
}
refresh();
getch();
endwin();
return 0;
}