-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathmenu.cpp
More file actions
85 lines (77 loc) · 3.09 KB
/
Copy pathmenu.cpp
File metadata and controls
85 lines (77 loc) · 3.09 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#include <bits/stdc++.h>
#include ".\levels.cpp"
#include <windows.h>
using namespace std;
class Menu
{
private:
int choice;
string playerName;
Users userObj;
public:
void logo()
{
cout << "************************************************************************************************" << endl;
cout << " _______ _ __ __ _ " << endl;
cout << " |__ __| (_) | \\/ | | | " << endl;
cout << " | | _ _ _ __ _ _ __ __ _ | \\ / | __ _ ___ | |_ ___ _ __ " << endl;
cout << " | | | | | | | '_ \\ | | | '_ \\ / _` | | |\\/| | / _` | / __| | __| / _ \\ | '__|" << endl;
cout << " | | | |_| | | |_) | | | | | | | | (_| | | | | | | (_| | \\__ \\ | |_ | __/ | | " << endl;
cout << " |_| \\__, | | .__/ |_| |_| |_| \\__, | |_| |_| \\__,_| |___/ \\__| \\___| |_| " << endl;
cout << " __/ | | | __/ | " << endl;
cout << " |___/ |_| |___/ " << endl;
cout << "************************************************************************************************" << endl;
cout << "\n Welcome to Typing Master " << endl;
}
void start()
{
playerName = userObj.addUserStarting();
}
void menu()
{
cout <<"\nWelcome "<<playerName<<"!\n";
cout << "\nSelect the Mode:-\n" << endl;
cout << "1. Classic Mode" << endl;
cout << "2. Time Attack Mode" << endl;
cout << "3. User Reports" << endl;
cout << "4. Exit" << endl;
cout << "Enter Your Choice: ";
cin >> choice;
switch (choice)
{
case 1:
modes(choice);
break;
case 2:
modes(choice);
break;
case 3:
modes(choice);
break;
case 4:
cout << endl << endl;
cout << " _____ _ _ __ __ " << endl;
cout << "|_ _|| | | | \\ \\ / / " << endl;
cout << " | | | |__ __ _ _ __ | | __ \\ V / ___ _ _ " << endl;
cout << " | | | '_ \\ / _` || '_ \\ | |/ / \\ / / _ \\ | | | |" << endl;
cout << " | | | | | || (_| || | | || < | | | (_) || |_| |" << endl;
cout << " \\_/ |_| |_| \\__,_||_| |_||_|\\_\\ \\_/ \\___/ \\__,_|" << endl<<endl<<endl;
exit(0);
}
}
void modes(int i)
{
if(i==1) {
ClassicMode obj(playerName);
obj.menu();
}
else if(i==2) {
TimeAttackMode obj(playerName);
obj.menu();
}
else if(i==3) {
Users obj;
obj.menu();
}
}
};