Repository navigation
Expand file tree
/
Copy pathSource_code(1).cpp
More file actions
511 lines (375 loc) · 11.1 KB
/
Copy pathSource_code(1).cpp
File metadata and controls
511 lines (375 loc) · 11.1 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
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
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
#include<iostream>
#include<vector>
#include<string>
using namespace std;
vector<string> caseFiles;
void showCaseFiles()
{
cout<<endl;
cout << " CASE FILES ";
cout<<endl;
if(caseFiles.empty())
{
cout << "No evidence collected yet.\n";
}
else
{
for(int i=0;i<caseFiles.size();i++)
{
cout << (i+1) <<". "<<caseFiles[i]<<endl;
}
}
cout<<endl;
}
//class room
void classroomScene()
{
int choice;
cout << " CLASSROOM 214 \n";
cout<<endl;
cout << "Time: 8:45 PM\n\n";
cout << "The college campus is nearly empty.\n";
cout << "You receive a strange anonymous message:\n\n";
cout << "\"Come to Classroom 214 immediately.\"\n\n";
cout << "You slowly walk toward the old classroom.\n";
cout << "The hallway lights flicker.\n";
cout << "A cold silence fills the corridor.\n\n";
cout << "You open the classroom door carefully...\n\n";
while(true)
{
cout << "\nWhat would you like to investigate?\n\n";
cout << "1. Inspect Teacher's Desk\n";
cout << "2. Check Blackboard\n";
cout << "3. Open Last Bench Drawer\n";
cout << "4. Look Near Window\n";
cout << "5. View Case Files\n";
cout << "6. Leave Classroom\n\n";
cout << "Enter your choice: ";
cin >> choice;
cout << endl;
switch(choice)
{
case 1:
{
cout << "You inspect the teacher's desk carefully.\n";
cout << "Under a pile of papers, you find a torn ID card.\n";
bool found = false;
for(int i = 0; i < caseFiles.size(); i++)
{
if(caseFiles[i] == "Torn ID Card")
{
found = true;
}
}
if(!found)
{
caseFiles.push_back("Torn ID Card");
cout << "[Evidence Added: Torn ID Card]\n";
}
else
{
cout << "You already collected this evidence.\n";
}
break;
}
case 2:
{
cout << "You stare at the blackboard.\n";
cout << "Written in red chalk are the words:\n\n";
cout << "\"THE LIBRARY KNOWS EVERYTHING\"\n\n";
cout << "A strange feeling runs down your spine.\n";
break;
}
case 3:
{
cout << "You slowly open the last bench drawer.\n";
cout << "Inside, you discover a Physics Lab Key.\n";
bool found = false;
for(int i = 0; i < caseFiles.size(); i++)
{
if(caseFiles[i] == "Physics Lab key" )
{
found = true;
}
}
if(!found)
{
caseFiles.push_back("Physics Lab Key");
cout << "[Evidence Added: Physics Lab Key]\n";
}
else
{
cout << "You already collected this evidence.\n";
}
break;
}
case 4:
{
cout << "You walk toward the classroom window.\n";
cout << "Outside, you notice a shadow moving near the Physics Department.\n";
cout << "Before you can focus, it disappears.\n";
break;
}
case 5:
{
showCaseFiles();
break;
}
case 6:
{
cout << "You leave Classroom 214 slowly.\n";
cout << "But you feel like someone is watching you...\n\n";
cout<<endl;
return;
}
default:
{
cout << "Invalid choice. Try again.\n";
}
}
}
}
// Physics dept
void physicsDepartment()
{
int choice;
while(true)
{
cout<<endl;
cout << " PHYSICS DEPARTMENT\n";
cout<<endl;
cout << "1. Inspect Laboratory\n";
cout << "2. Check Experiment Table\n";
cout << "3. View Case Files\n";
cout << "4. Return\n\n";
cout << "Enter choice: ";
cin >> choice;
switch(choice)
{
case 1:
{
cout << "\nBroken instruments are scattered everywhere.\n";
cout << "You notice strange burn marks on the wall.\n";
break;
}
case 2:
{
cout << "\nYou find a Burnt Research Paper.\n";
bool found = false;
for(int i = 0; i < caseFiles.size(); i++)
{
if(caseFiles[i] == "Burnt Research Paper")
{
found = true;
}
}
if(!found)
{
caseFiles.push_back("Burnt Research Paper");
cout << "[Evidence Added]\n";
}
break;
}
case 3:
{
showCaseFiles();
break;
}
case 4:
{
return;
}
default:
{
cout << "Invalid choice.\n";
}
}
}
}
// Mathematics dept
void mathematicsDepartment()
{
cout<<endl;
cout << " MATHEMATICS DEPARTMENT\n";
cout<<endl;
cout << "Equations cover every wall.\n";
cout << "One equation is circled repeatedly:\n\n";
cout << "214 = FINAL ROOM\n\n";
}
// chemistry lab
void chemistryLab()
{
cout<<endl;
cout << " CHEMISTRY LAB\n";
cout<<endl;
cout << "Broken glass and chemical smell fill the lab.\n";
cout << "You discover blood stained gloves near the sink.\n";
bool found = false;
for(int i = 0; i < caseFiles.size(); i++)
{
if(caseFiles[i] == "Stained Gloves")
{
found = true;
}
}
if(!found)
{
caseFiles.push_back("Stained Gloves");
cout << "[Evidence Added]\n";
}
}
// CIVIL DEPARTMENT
void civilDepartment()
{
cout<<endl;
cout << " CIVIL DEPARTMENT\n";
cout<<endl;
cout << "You find an old underground blueprint.\n";
bool found = false;
for(int i = 0; i < caseFiles.size(); i++)
{
if(caseFiles[i] == "Underground Blueprint")
{
found = true;
}
}
if(!found)
{
caseFiles.push_back("Underground Blueprint");
cout << "[Evidence Added]\n";
}
}
// Library
void libraryScene()
{
cout<<endl;
cout << " CENTRAL LIBRARY\n";
cout<<endl;
cout << "You search the dusty archives.\n";
cout << "Inside an old file, you discover the truth.\n\n";
cout << "A secret experiment was conducted inside the college.\n";
cout << "The missing student tried to expose it.\n\n";
cout << "Suddenly...\n";
cout << "Footsteps echo behind you.\n\n";
cout << "You look in that direction. \n";
cout << "NO ONE\n";
cout << "You leave and go ahead with the search. \n";
}
// select the dept
void departmentMenu()
{
int choice;
while(true)
{
cout<<endl;
cout << " COLLEGE MAP\n";
cout<<endl;
cout << "1. Physics Department\n";
cout << "2. Mathematics Department\n";
cout << "3. Chemistry Lab\n";
cout << "4. Civil Department\n";
cout << "5. Central Library\n";
cout << "6. View Case Files\n";
cout << "7. Main Ground\n\n";
cout << "Enter choice: ";
cin >> choice;
switch(choice)
{
case 1:
physicsDepartment();
break;
case 2:
mathematicsDepartment();
break;
case 3:
chemistryLab();
break;
case 4:
civilDepartment();
break;
case 5:
libraryScene();
break;
case 6:
showCaseFiles();
break;
case 7:
cout << "\n Left the Department in Main Ground Now \n";
cout<<endl;
return;
default:
cout << "Invalid choice.\n";
}
}
}
void showmessage()
{
cout << "Time: 9:38 PM\n\n";
cout << "Your phone suddenly vibrates...\n\n";
cout<<endl;
cout << " UNKNOWN NUMBER \n";
cout<<endl;
cout << "\"Stop investigating Classroom 214.\"\n";
cout << "\"Some secrets should stay buried.\"\n";
cout << "\"Leave now... or you're next.\"\n\n";
cout<<endl;
cout << "Your heartbeat starts getting faster.\n";
cout << "A cold chill runs down your spine.\n\n";
}
void finalChoice()
{
int choice;
cout<<"Now what you you wanna do\n";
cout<<"1. Go back to the Classroom 214 and RISK IT AGAIN!!! \n\n";
cout<<"2. RUN FOR YOUR LIFE";
cout<<endl;
cout << "Enter choice: ";
cin >> choice;
switch(choice)
{
case 1:
{
cout<<"\nYou slowly walk back toward Classroom 214.\n\n";
cout<<"The classroom door is already open.\n";
cout<<"The lights flicker violently.\n\n";
cout<<"You step inside carefully...\n\n";
cout<<"\nSuddenly...\n";
cout<<"FOOTSTEPS RUN TOWARD YOU.\n";
cout<<"Before you can react...\n";
cout<<"Someone attacks you from behind.\n\n";
cout<<"Your vision becomes blurry...\n";
cout<<"Everything fades into darkness...\n\n";
cout<<endl;
cout << " END OF CHAPTER 1!!!\n"<<endl;
cout<<" TO BE CONTINUED \n\n";
cout<<endl;
return;
}
case 2:
{
cout << "\nYou decide to leave the college immediately.\n";
cout << "As you walk away, your phone vibrates one last time.\n\n";
cout << "\"You made the right choice.\"\n\n";
cout << "You never return to the campus again.\n\n";
cout << " GAME ENDED!!!!!! \n";
return;
}
default:
{
cout << "Invalid choice.\n";
finalChoice();
}
}
}
int main()
{
cout<<endl;
cout << " THE DEPARTMENT FILES\n";
cout<<endl;
cout << "\nA Thriller Mystery Investigation Game\n";
classroomScene();
departmentMenu();
showmessage();
finalChoice();
return 0;
}