-
Notifications
You must be signed in to change notification settings - Fork 0
/
mainLogicFunction.h
257 lines (204 loc) · 7.91 KB
/
mainLogicFunction.h
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
#pragma once
using namespace std;
#include <iostream>
#include <fstream>
#include <string>
#include "userName.h"
#include "workingWithFiles.h"
#include "allVariables.h"
#include "statistics.h"
#include "allQuestions.h"
#include "endings.h"
void mainLogic()
{
do
{
// Title Game.
readFile("titleGame.txt");
cout << "Your decisions have an impact on the event, and choose wisely";
// Emoji.
for (int i = 0; i <= 3; i++) {
for (int j = 0; j < 3; j++)
{
cout << emoji[i][j];
}
}
cout << "\n";
system("PAUSE");
system("cls");
readFile("startText.txt");
system("PAUSE");
system("cls");
readFile("Day1UI.txt");
askName();
saveFile("userName.txt", userName);
statistics();
system("PAUSE");
system("cls");
cout << "\nDoctor: ";
cout << "Hello " + userName;
readFile("startText2.txt");
system("PAUSE");
system("cls");
cout << "\n" + userName + ": I will ask you a counter question, what is your name?\n";
system("PAUSE");
system("cls");
cout << "\nDoctor: " << "My name is " << doctor + "!\n";
cout << "\n" << doctor + ": " << "Now let's move on to the questions!\n";
cout << doctor + ": " << "And remember, answer the most truthfully...\n";
system("PAUSE");
system("cls");
cout << "\n" + doctor + ": ";
readFile("questionAndAnswer1.txt");
cout << userName + ": " << "You joking!\n";
cout << "\n" << doctor + ": " + "No, I'm serious.\n";
system("PAUSE");
system("cls");
notInmportantQuestion1("questionAndAnswer1.txt");
system("PAUSE");
system("cls");
cout << userName + ": " + "What stupid questions?\n";
cout << doctor + ": " + "This is not stupid questions.\n";
system("PAUSE");
cout << doctor + ": " + "I will try to help you" << endl;
cout << userName + ": " + "For what?\n";
system("PAUSE");
cout << "\n" + doctor + ": " "In response, silence...\n";
cout << doctor + ": " + "Let's move on to the next question.\n";
system("PAUSE");
system("cls");
importantQuestion("questionAndAnswer2.txt");
cout << doctor + ": " + "Let's move on to the next question.\n";
system("PAUSE");
system("cls");
importantQuestion("questionAndAnswer3.txt");
cout << doctor + ": " + "Let's move on to the next question.\n";
system("PAUSE");
system("cls");
importantQuestion("questionAndAnswer4.txt");
cout << doctor + ": " + "Let's move on to the next question.\n";
system("PAUSE");
system("cls");
importantQuestion("questionAndAnswer5.txt");
cout << doctor + ": " + "Let's move on to the next question.\n";
system("PAUSE");
system("cls");
importantQuestion("questionAndAnswer6.txt");
cout << doctor + ": " + "Let's move on to the next question.\n";
system("PAUSE");
system("cls");
importantQuestion("questionAndAnswer7.txt");
cout << doctor + ": " + "Let's move on to the next question.\n";
system("PAUSE");
system("cls");
importantQuestion("questionAndAnswer8.txt");
cout << doctor + ": " + "Let's move on to the next question.\n";
system("PAUSE");
system("cls");
cout << userName + ": " + "Enough, I'm tired when this is over.\n";
cout << doctor + ": " + "Okay, I 've already written all down.\n";
cout << doctor + ": " + "You shouldn't be rude!";
cout << "\n" + userName + ": ";
notInmportantQuestion2("NotImportantQuestion1.txt");
cout << doctor + ": " + "See you tomorrow!\n";
system("PAUSE");
system("cls");
readFile("History1.txt");
notInmportantQuestion3("NotImportantQuestion2.txt");
system("PAUSE");
system("cls");
readFile("Day2UI.txt");
statistics();
cout << userName + ": And again to the doctor.\n";
system("PAUSE");
system("cls");
importantQuestion("questionAndAnswer9.txt");
cout << doctor + ": " + "Let's move on to the next question.\n";
system("PAUSE");
system("cls");
importantQuestion("questionAndAnswer10.txt");
cout << doctor + ": " + "Let's move on to the next question.\n";
system("PAUSE");
system("cls");
importantQuestion("questionAndAnswer11.txt");
cout << doctor + ": " + "Let's move on to the next question.\n";
system("PAUSE");
system("cls");
importantQuestion("questionAndAnswer12.txt");
cout << doctor + ": " + "Let's move on to the next question.\n";
system("PAUSE");
system("cls");
importantQuestion("questionAndAnswer13.txt");
cout << doctor + ": " + "Let's move on to the next question.\n";
system("PAUSE");
system("cls");
importantQuestion("questionAndAnswer14.txt");
cout << doctor + ": " + "Let's move on to the next question.\n";
system("PAUSE");
system("cls");
importantQuestion("questionAndAnswer15.txt");
cout << doctor + ": " + "Let's move on to the next question.\n";
system("PAUSE");
system("cls");
cout << "\n" + doctor + ": Congratulations " + userName + " tomorrow you will answer a few questions and learn the result of the test.\n";
system("PAUSE");
system("cls");
readFile("Day3UI.txt");
statistics();
cout << doctor + ": Today, you will learn the results of the test.\n";
importantQuestion("questionAndAnswer16.txt");
cout << doctor + ": " + "Let's move on to the next question.\n";
system("PAUSE");
system("cls");
importantQuestion("questionAndAnswer17.txt");
cout << doctor + ": " + "Let's move on to the next question.\n";
system("PAUSE");
system("cls");
importantQuestion("questionAndAnswer18.txt");
cout << doctor + ": " + "Let's move on to the next question.\n";
system("PAUSE");
system("cls");
importantQuestion("questionAndAnswer19.txt");
cout << doctor + ": " + "Let's move on to the next question.\n";
system("PAUSE");
system("cls");
importantQuestion("questionAndAnswer20.txt");
cout << doctor + ": " + "Let's move on to the next question.\n";
system("PAUSE");
system("cls");
importantQuestion("questionAndAnswer21.txt");
cout << doctor + ": " + "Let's move on to the next question.\n";
system("PAUSE");
system("cls");
importantQuestion("questionAndAnswer22.txt");
cout << doctor + ": " + "Let's move on to the next question.\n";
system("PAUSE");
system("cls");
readFile("UI2.txt");
statistics();
system("PAUSE");
system("cls");
cout << doctor + ": All this test is over, you can go to results.\n";
system("PAUSE");
system("cls");
readFile("History2.txt");
system("PAUSE");
system("cls");
cout << "\nYou have scored " << *endPoints << " points.\n";
endings();
readFile("caption.txt");
system("PAUSE");
system("cls");
playAgain("playAgain.txt");
if (endGame == true)
{
system("PAUSE");
system("cls");
mainLogic();
}
else if (endGame == false)
{
break;
}
} while (endGame == true);
}