-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMain.cpp
More file actions
714 lines (674 loc) · 26.1 KB
/
Main.cpp
File metadata and controls
714 lines (674 loc) · 26.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
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
//Main.cpp
//Program Description: This file contains the main function and it actually shows the whole logic flow of our game
#include <iostream>
#include <unistd.h>
#include <vector>
#include "Map.h"
#include "HomeMenu.h"
#include "ItemAndMonster.h"
#include "battle.h"
#include "tictactoe.h"
#include "guessobject.h"
#include "readfile.h"
#include "savefile.h"
#include "Main_Menu.h"
using namespace std;
//Global variables
Main_character Chris;
string Map[31];
Equiment Gun_1= {"Gun_1","GLock-18 Pistol", 0, 0, 10, -1} ,Gun_2 = {"Gun_2","AK47", 0, 0, 20, -3},Gun_3 = {"Gun_3","Shotgun", 0, 0, 15, -3}, Gun_4 ={"Gun_4","Sub Machine Gun", 0, 0, 10, -2},Armour_1={"Armour_1","Army Boots", 0, 5, 0, 10},Armour_2={"Armour_2","Police Bullet Proof Vest", 0, 10, 0, -5},Armour_3={"Armour_3","Army Gloves", 0, 5, 0, -2},Armour_4={"Armour_4","helmet", 0, 10, 0, -3};
vector <Equiment> Equiment_Array = {Gun_1,Gun_2,Gun_3,Gun_4,Armour_1,Armour_2,Armour_3,Armour_4};
//Use of dynamic memory - vector
//Thi struct is to store items that are possible to be obtained by Chris
Item heal_1={"heal_1","Bandage",15,1},heal_2={"heal_2","Energy Drink",10,1},heal_3={"heal_3","Mysterious Potion",20,1},heal_4={"heal_4","Mini Bandage",10,1},grenade_1={"grenade_1","M67 Grenade",20,2}, grenade_2={"grenade_2","Gas Bomb",15, 2}, device={"device","Hacking Device",0,0},daughter={"daughter", "Alexandra",0,0},bomb={"bomb","Wall Bomb",0,0};
vector <Item> Item_Array = {heal_1,heal_2,heal_3,heal_4,grenade_1,grenade_2,daughter,device,bomb};
//use of dynamic memory - vector
//This struct is speically for storing status, items and equipments of main character Chris
//This struct is for storing the stats and attributes of every monster
Monster zero{"Big Boss", 100, 40, 40, 10} , one{"Mister Muscles", 100, 30, 20, 10} , two{"Mister Hawkeye", 70, 20, 15, 20}, three{"Mister Guard", 50, 10, 5, 50}, four{"Mister Alien", 50, 10, 5, 50};
int main(){
string current, next;
int option, difficulty = 1, win = 0;
print_MainMenu();
string choice;
bool flag = false;
//This blockof codes is to take input from player to determine what choices the player has made in the Main Menu Page
while (!flag){
getline(cin,choice);
flag = MainMenu_Choice(choice, Map, Chris);
}
int result;
current = Chris.current;
//Use of while loop to keep the game going unless the player has won the game or the player has died and the loop will break
while (true){
system("clear");
print_HomeMenu(Map,Chris);
cin >> option;
if (option == 1){ //Option 1 indicates the player wants to move to other locations
cout << "Where do you want to go next?" << endl;
cin >> next;
if (current == "entrance"){
while (true){
if (next == "Canteen"){
//Use of a variable Map_Count to determine whether the player moves to this location before or not
//Battle will only be trigerred if player did not come to this location before
if (Chris.Map_Count[next] == 0){
result = battleStats(2,Chris);
//result = 1 means the player has won the battle against the villain
//The location of Chris will be updated to this new location
if (result == 1){
Chris.Chris_Item.push_back(heal_1);
cout << "You have obtained a "<< heal_1.name << ". It can heal you by "<< heal_1.value << "HP ."<< endl;
Chris.Chris_Equiment.push_back(Armour_1);
cout << "You have obtained an "<< Armour_1.name << ". It increases your armour by "<< Armour_1.armour << " and your speed by " << Armour_1.speed << "." << endl;
cout.flush();
sleep(3);
Chris.Map_Count[next] = 1;
Chris.armour += Armour_1.armour;
Chris.speed += Armour_1.speed;
current = "canteen";
Current_At_Canteen(Map);
cout << "Auto Saving..." << endl;
Chris.current = current;
//Auto save function is provided :)
SaveMap(Map);
SaveCharacter(Chris);
cout.flush(); sleep(1);
cout <<"Auto Save Completed!";
cout.flush(); sleep(1);
}
//results = 0 means the player has lost the battle against the villain and player is dead
else if (result == 0){
load_MainCharacter(Chris);
SetItemAndEquiment(Chris);
Chris.current = current;
print_Lose();
cout.flush(); sleep(1);
cout << "Loading from last saving..." << endl;
cout.flush(); sleep(2);
break;
}
break;
//If player chose to run, the result will be 2, which means the location of player is not updated and player is still at his previous location
}
//This block of code is run when the player has been to this location before
//Hence battle will not be called out
else{
current = "canteen";
Chris.current = current;
Current_At_Canteen(Map);
break;
}
}
else if (next == "Stairs"){
if (Chris.Map_Count[next] == 0){
int result = battleStats(2,Chris);
if (result == 1){
Chris.Chris_Item.push_back(heal_2);
cout << "You have obtained a "<< heal_2.name << ". It can heal you by "<< heal_2.value << "HP ."<< endl;
Chris.Chris_Item.push_back(grenade_2);
cout << "You have obtained a" << grenade_2.name << ". It can cause " << grenade_2.value << " damage to the enemy."<<endl;
Chris.Chris_Equiment.push_back(Gun_1);
cout << "You have obtained an "<< Gun_1.name << ". It increases your damage by "<< Gun_1.damage << " and your speed by " << Gun_1.speed << "." << endl;
cout.flush();
sleep(3);
Chris.Map_Count[next] = 1;
Chris.damage += Gun_1.damage;
Chris.speed += Gun_1.speed;
current = "stairs";
Current_At_Stairs(Map);
cout << "Auto Saving..." <<endl;
Chris.current = current;
SaveMap(Map);
SaveCharacter(Chris);
cout.flush(); sleep(1);
cout <<"Auto Save Completed!";
cout.flush(); sleep(1);
}
else if (result == 0){
load_MainCharacter(Chris);
SetItemAndEquiment(Chris);
Chris.current = current;
print_Lose();
cout.flush(); sleep(1);
cout << "Loading from last saving..." << endl;
cout.flush(); sleep(2);
break;
}
break;
}
else{
current = "stairs";
Chris.current = current;
Current_At_Stairs(Map);
break;
}
}
else if (next == "Lobby"){
if (Chris.Map_Count[next] == 0){
int result = battleStats(2,Chris);
if (result == 1){
Chris.Chris_Item.push_back(heal_4);
cout << "You have obtained a "<< heal_4.name << ". It can heal you by "<< heal_4.value << "HP ."<< endl;
Chris.Chris_Item.push_back(grenade_1);
cout << "You have obtained a" << grenade_1.name << ". It can cause " << grenade_1.value << " damage to the enemy."<<endl;
Chris.Chris_Equiment.push_back(Armour_2);
cout << "You have obtained a "<< Armour_2.name << ". It increases your armour by "<< Armour_2.armour << " and your speed by " << Armour_2.speed << "." << endl;
cout.flush();
sleep(3);
Chris.Map_Count[next] = 1;
Chris.armour += Armour_2.armour;
Chris.speed += Armour_2.speed;
current = "lobby";
Current_At_Lobby(Map);
cout << "Auto Saving..." <<endl;
Chris.current = current;
SaveMap(Map);
SaveCharacter(Chris);
cout.flush(); sleep(1);
cout <<"Auto Save Completed!";
cout.flush(); sleep(1);
}
else if (result == 0){
load_MainCharacter(Chris);
SetItemAndEquiment(Chris);
Chris.current = current;
print_Lose();
cout.flush(); sleep(1);
cout << "Loading from last saving..." << endl;
cout.flush(); sleep(2);
break;
}
break;
}
else{
current = "lobby";
Chris.current = current;
Current_At_Lobby(Map);
break;
}
}
else if (next == "Outside"){
cout << "You have to win a TicTacToe game in order to unlock the door and go outside." << endl;
//if player wins the tictaetoe and he has Alexandra alongside, player can leave
if (TicTacToe(difficulty)){
for (int j = 0; j < Chris.Chris_Item.size(); j++){
if (Chris.Chris_Item[j].name == "Alexandra"){
win++;
}
}
break;
}
else{
cout << "You did not win. Try again next time." << endl;
cout.flush(); sleep(2);
break;
}
}
else{
cout << "You cannot reach there with your current location or you have typed the wrong location name." << endl;
cout.flush(); sleep(3);
break;
}
}
}
else if (current == "canteen"){
while (true){
if (next == "Entrance"){
current = "entrance";
Chris.current = current;
Current_At_Entrance(Map);
break;
}
else{
cout << "You cannot reach there with your current location or you have typed the wrong location name." << endl;
cout.flush(); sleep(3);
break;
}
}
}
else if (current == "stairs"){
while (true){
if (next == "Entrance"){
current = "entrance";
Chris.current = current;
Current_At_Entrance(Map);
break;
}
else{
cout << "You cannot reach there with your current location or you have typed the wrong location name." << endl;
cout.flush(); sleep(3);
break;
}
}
}
else if (current == "lobby"){
while (true){
if (next == "BioLab"){
if (Chris.Map_Count[next] == 0){
int result = battleStats(1,Chris);
if (result == 1){
Chris.Chris_Item.push_back(heal_1);
cout << "You have obtained a "<< heal_1.name << ". It can heal you by "<< heal_1.value << "HP ."<< endl;
Chris.Chris_Equiment.push_back(Armour_4);
cout << "You have obtained a "<< Armour_4.name << ". It increases your armour by "<< Armour_4.armour << " and your speed by " << Armour_2.speed << "." << endl;
cout.flush();
sleep(3);
Chris.Map_Count[next] = 1;
Chris.armour += Armour_4.armour;
Chris.speed += Armour_4.speed;
current = "biolab";
Current_At_BioLab(Map);
cout << "Auto Saving..." <<endl;
Chris.current = current;
SaveMap(Map);
SaveCharacter(Chris);
cout.flush(); sleep(1);
cout <<"Auto Save Completed!";
cout.flush(); sleep(1);
}
else if (result == 0){
load_MainCharacter(Chris);
SetItemAndEquiment(Chris);
print_Lose();
Chris.current = current;
cout.flush(); sleep(1);
cout << "Loading from last saving..." << endl;
cout.flush(); sleep(2);
break;
}
break;
}
else{
current = "biolab";
Chris.current = current;
Current_At_BioLab(Map);
break;
}
}
else if (next == "SecurityOffice"){
if (Chris.Map_Count[next] == 0){
int result = battleStats(0,Chris);
if (result == 1){
Chris.Chris_Item.push_back(heal_2);
cout << "You have obtained a "<< heal_2.name << ". It can heal you by "<< heal_2.value << "HP ."<< endl;
Chris.Chris_Item.push_back(bomb);
cout << "You have obtained a "<< bomb.name << endl;
cout << "Your daughter is in the jail now. In order to save her you need to use the wall bomb to break the wall" << endl;
cout.flush();
sleep(3);
Chris.Map_Count[next] = 1;
current = "securityoffice";
Current_At_SecurityOffice(Map);
cout << "Auto Saving..." <<endl;
Chris.current = current;
SaveMap(Map);
SaveCharacter(Chris);
cout.flush(); sleep(1);
cout <<"Auto Save Completed!";
cout.flush(); sleep(1);
}
else if (result == 0){
load_MainCharacter(Chris);
SetItemAndEquiment(Chris);
print_Lose();
Chris.current = current;
cout.flush(); sleep(1);
cout << "Loading from last saving..." << endl;
cout.flush(); sleep(2);
break;
}
break;
}
else{
current = "securityoffice";
Chris.current = current;
Current_At_SecurityOffice(Map);
break;
}
}
else if (next == "A1"){
if (Chris.Map_Count[next] == 0){
int result = battleStats(1,Chris);
if (result == 1){
Chris.Chris_Item.push_back(heal_2);
cout << "You have obtained a "<< heal_2.name << ". It can heal you by "<< heal_2.value << "HP ."<< endl;
Chris.Chris_Equiment.push_back(Gun_2);
cout << "You have obtained a "<< Gun_2.name << ". It increases your damage by "<< Gun_2.damage << " and your speed by " << Gun_2.speed << "." << endl;
cout.flush();
sleep(3);
Chris.Map_Count[next] = 1;
Chris.damage += Gun_2.damage;
Chris.speed += Gun_2.speed;
current = "A1";
Current_At_A1(Map);
cout << "Auto Saving..." <<endl;
Chris.current = current;
SaveMap(Map);
SaveCharacter(Chris);
cout.flush(); sleep(1);
cout <<"Auto Save Completed!";
cout.flush(); sleep(1);
}
else if (result == 0){
load_MainCharacter(Chris);
SetItemAndEquiment(Chris);
print_Lose();
Chris.current = current;
cout.flush(); sleep(1);
cout << "Loading from last saving..." << endl;
cout.flush(); sleep(2);
break;
}
break;
}
else{
current = "A1";
Chris.current = current;
Current_At_A1(Map);
break;
}
}
else if (next == "Entrance"){
current = "entrance";
Chris.current = current;
Current_At_Entrance(Map);
break;
}
else{
cout << "You cannot reach there with your current location or you have typed the wrong location name." << endl;
cout.flush(); sleep(3);
break;
}
}
}
else if (current == "biolab"){
while (true){
if (next == "A6868"){
if (Chris.Map_Count[next] == 0){
int result = battleStats(1,Chris);
if (result == 1){
Chris.Chris_Item.push_back(heal_3);
cout << "You have obtained a "<< heal_3.name << ". It can heal you by "<< heal_3.value << "HP ."<< endl;
Chris.Chris_Equiment.push_back(Gun_3);
cout << "You have obtained a "<< Gun_3.name << ". It increases your damage by "<< Gun_3.damage << " and your speed by " << Gun_3.speed << "." << endl;
cout.flush();
sleep(3);
Chris.Map_Count[next] = 1;
Chris.damage += Gun_3.damage;
Chris.speed += Gun_3.speed;
current = "A6868";
Current_At_A6868(Map);
cout << "Auto Saving..." <<endl;
Chris.current = current;
SaveMap(Map);
SaveCharacter(Chris);
cout.flush(); sleep(1);
cout <<"Auto Save Completed!";
cout.flush(); sleep(1);
}
else if (result == 0){
load_MainCharacter(Chris);
SetItemAndEquiment(Chris);
print_Lose();
Chris.current = current;
cout.flush(); sleep(1);
cout << "Loading from last saving..." << endl;
cout.flush(); sleep(2);
break;
}
break;
}
else{
current = "A6868";
Chris.current = current;
Current_At_A6868(Map);
break;
}
}
else if (next == "Chemistry"){
if (Chris.Map_Count[next] == 0){
int result = battleStats(1,Chris);
if (result == 1){
Chris.Chris_Item.push_back(heal_2);
cout << "You have obtained a "<< heal_2.name << ". It can heal you by "<< heal_2.value << "HP ."<< endl;
Chris.Chris_Equiment.push_back(Gun_4);
cout << "You have obtained a "<< Gun_4.name << ". It increases your damage by "<< Gun_4.damage << " and your speed by " << Gun_4.speed << "." << endl;
cout.flush();
sleep(3);
Chris.Map_Count[next] = 1;
Chris.damage += Gun_4.damage;
Chris.speed += Gun_1.speed;
current = "chemistry";
Current_At_Chemistry(Map);
cout << "Auto Saving..." <<endl;
Chris.current = current;
SaveMap(Map);
SaveCharacter(Chris);
cout.flush(); sleep(1);
cout <<"Auto Save Completed!";
cout.flush(); sleep(1);
}
else if (result == 0){
load_MainCharacter(Chris);
SetItemAndEquiment(Chris);
print_Lose();
Chris.current = current;
cout.flush(); sleep(1);
cout << "Loading from last saving..." << endl;
cout.flush(); sleep(2);
break;
}
break;
}
else{
current = "chemistry";
Chris.current = current;
Current_At_Chemistry(Map);
break;
}
}
else if (next == "Lobby"){
current = "lobby";
Chris.current = current;
Current_At_Lobby(Map);
break;
}
else{
cout << "You cannot reach there with your current location or you have typed the wrong location name." << endl;
cout.flush(); sleep(3);
break;
}
}
}
else if (current == "securityoffice"){
while (true){
if (next == "Lobby"){
current = "lobby";
Chris.current = current;
Current_At_Lobby(Map);
break;
}
else{
cout << "You cannot reach there with your current location or you have typed the wrong location name." << endl;
cout.flush(); sleep(3);
break;
}
}
}
else if (current == "A1"){
while (true){
if (next == "Lobby"){
current = "lobby";
Chris.current = current;
Current_At_Lobby(Map);
break;
}
else{
cout << "You cannot reach there with your current location or you have typed the wrong location name." << endl;
cout.flush(); sleep(3);
break;
}
}
}
else if (current == "A6868"){
while (true){
if (next == "BioLab"){
current = "biolab";
Chris.current = current;
Current_At_BioLab(Map);
break;
}
else if (next == "Toilet"){
//Entering toilet will grant you a hacking device to lower the difficulty of the TicTacToe
//Before entering toilet you have to win a mini game called GuessObject to be granted the entry access
cout << "You have to play a mini game to enter Toilet." << endl;
cout << "You have to get a 3 out of 5 to win the mini game" << endl;
int r1, score = 0;
//This block of code will prevent same object from happening
int Num_Picked[5]={0,0,0,0,0};
for (int i = 0; i < 5; i++){
do{
r1 = rand() % 5;
}
while(Num_Picked[r1] == 1);
Num_Picked[r1] = 1;
if (guessObject(r1)){
score++;
}
}
if (score >= 5){
current = "toilet";
Current_At_Toilet(Map);
Chris.current = "toilet";
//Chris has acquired the hacking device
Chris.Chris_Item.push_back(device);
cout << "You have obtained a hacking device to lower the difficulty of the TicTaeToe game to unlock the locked entrance door." << endl;
cout.flush();
sleep(4);
break;
}
else{
cout << "You have failed the mini game. Try Again. :) " << endl;
cout.flush();
sleep(2);
break;
}
}
else{
cout << "You cannot reach there with your current location or you have typed the wrong location name." << endl;
cout.flush(); sleep(3);
break;
}
}
}
else if (current == "chemistry"){
while (true){
if (next == "BioLab"){
current = "biolab";
Chris.current = current;
Current_At_BioLab(Map);
break;
}
else{
cout << "You cannot reach there with your current location or you have typed the wrong location name." << endl;
cout.flush(); sleep(3);
break;
}
}
}
else if (current == "toilet"){
while (true){
if (next == "A6868"){
current = "A6868";
Chris.current = current;
Current_At_A6868(Map);
break;
}
else{
cout << "You cannot reach there with your current location or you have typed the wrong location name." << endl;
cout.flush(); sleep(3);
break;
}
}
}
}
else if (option == 2){
int choice;
if(Chris.Chris_Item.size() <= 0){
cout<<"You don't have any items yet." << endl;
cout.flush();
sleep(3);
continue;
}
print_item(Chris.Chris_Item);
cout << endl;
cout << "[99]: I don't feel like using any item right now." << endl;
cin >> choice;
if (choice != 99 and choice < Chris.Chris_Item.size()){
if (Chris.Chris_Item[choice].type == 1){
Chris.health += Chris.Chris_Item[choice].value;
cout << "You have been healed for " << Chris.Chris_Item[choice].value << "HP" << endl;
cout.flush();
sleep(3);
Chris.Chris_Item.erase(Chris.Chris_Item.begin()+choice);
}
//Use of Hacking Device to lower the difficulty of TicTaeToe
//Only can be used when Chris is at Entrance
else if(Chris.Chris_Item[choice].name == "Hacking Device"){
if (current == "entrance"){
cout << "The difficulty has been lowered." << endl;
difficulty = 0;
cout.flush();
sleep(3);
Chris.Chris_Item.erase(Chris.Chris_Item.begin()+choice);
}
else{
cout << "This item cannot be used here" << endl;
cout.flush();
sleep(3);
}
}
//Use of Wall Bomb to bomb the wall of jail to rescue his daughter Alexandra
//Only can be used when Chris is at Secuiry Office
else if(Chris.Chris_Item[choice].name == "Wall Bomb") {
if (current == "securityoffice"){
cout << "The wall of security office is bombed. You finally see your daughter. Your daughter is following you now." << endl;
cout.flush();
sleep(3);
Chris.Chris_Item.push_back(daughter);
BombTheWall(Map);
Chris.Chris_Item.erase(Chris.Chris_Item.begin()+choice);
}
else{
cout << "This item cannot be used here" << endl;
cout.flush();
sleep(2);
}
}
}
}
else if (option == 3){
if(Chris.Chris_Equiment.size() <= 0)
cout<<"You don't have any items yet." << endl;
print_equiment(Chris.Chris_Equiment);
cout.flush();
sleep(4);
}
else if (option == 4){
Chris.current = current;
SaveMap(Map);
SaveCharacter(Chris);
break;
}
if (win == 1){
print_Victory();
break;
}
if (win == -1){
print_Lose();
break;
}
}
return 0;
}