-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMARK3.CPP
1473 lines (1429 loc) · 31.9 KB
/
MARK3.CPP
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
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#include<stdio.h>
#include<fstream.h>
#include<conio.h>
#include<dos.h>
#include<stdlib.h>
#include<string.h>
#include<time.h>
#include<iomanip.h>
void start();
void s2time();
void osload();
void stime();
void login();
void about();
void fin();
void load1();
void load2();
void load3();
void load4();
void guess();
void read1();
void read2();
void stats();
void load5();
void inst();
void del();
void drul();
void typo();
void thnk();
void blin();
void vcricket();
void game(int);
void explorer();
void dayf();
void f();
int fall(int);
class app
{private : int i,j,l;
public:
void game(int);
}a; ///class ending!
void app:: game(int z)
{clrscr();
int opt,i;
for(i=0;i<27;i++)
{_setcursortype(_NOCURSOR);
if(z==1)
goto mm;
textcolor(BROWN);
clrscr();
gotoxy(i,12);
cout<<"Welome ";
delay(15);
}
for(i=0;i<=12;i++)
{clrscr();
gotoxy(27,12);
cout<<"Welcome ";
gotoxy(35,i);
cout<<"To ";
delay(30);
}
for(i=24;i>11;i--)
{clrscr();
gotoxy(27,12);
cout<<"Welcome To ";
gotoxy(38,i);
cout<<"AV ";
delay(30);
}
for(i=0;i<=12;i++)
{clrscr();
gotoxy(27,12);
cout<<"Welcome To AV";
gotoxy(41,i);
cout<<"App ";
delay(30);
}
for(i=54;i>44;i--)
{clrscr();
gotoxy(27,12);
cout<<"Welcome To AV App";
gotoxy(i,12);
cout<<"Player ";
delay(30);
}
getch();
app:
textcolor(GREEN);
clrscr();
stime();
gotoxy(1,1);
textattr(3);
cprintf("Enter the number of an app to open");
textattr(8);
gotoxy(2,3);
cprintf("\n\t\t Installed apps");
cout<<"\n\n1. Typo.(A typing app)\t\t2. Mind Freak!\n\n3. Friendship calc \3\t\t4. DRUL [mind game]\n\n5. GuEsS mE NoT\t\t\t6. Day finder\n\n7. Virtua Cricket\t\t8.Exit";
_setcursortype(_NORMALCURSOR);
gotoxy(24,13);
cin>>opt;
switch(opt)
{
mm:
case 1:{textcolor(CYAN);clrscr();
load1();load2();load3();load4();load5();
fin();
del();
blin();
typo();
try:
clock_t start, end;float s1,s2,s3,s4,p1,p2,p3,p4,score1,score2,score3,score4,speed;
int total;
clrscr();
textcolor(RED);
char name[100];
cprintf("Enter name:\n");
_setcursortype(_NORMALCURSOR);
cin>>name;
clrscr();
gotoxy(1,1);
textcolor(WHITE);
cout<<"Hi, \n";
cprintf(name);
inst();
clrscr();
//round1();
_setcursortype(_NOCURSOR);
textcolor(YELLOW);
delay(400);
gotoxy(33,1);
cprintf("ROUND - 1");
char ch0[33]="123523433";
char str[]="I love my country";
char ch1[1000]="213542345";
_setcursortype(_NOCURSOR);
gotoxy(1,3);
delay(1000);
textcolor(WHITE);
cprintf(" type ");
delay(200);
textcolor(CYAN);
cprintf(" I love my country\n");
textcolor(YELLOW);
gotoxy(1,4);
delay(500);
cprintf("\n Press enter When ready !\n\n");
getch();
_setcursortype(_SOLIDCURSOR);
cin.getline(ch1,100);
gotoxy(8,7);
start=clock();
cin.getline(ch0,100);
end=clock();
int o=0;
for(int i=0;i<strlen(ch0);i++)
{if(ch0[i]==str[i])
o++;}
float time=(end-start)/CLK_TCK;
s1=time;
p1=strlen(ch0)-o;
//round2;
textcolor(CYAN);
clrscr();
_setcursortype(_NOCURSOR);
textcolor(YELLOW);
delay(400);
gotoxy(33,1);
cprintf("ROUND - 2");
gotoxy(1,3);
delay(1000);
textcolor(WHITE);
cprintf(" type ");
delay(200);
textcolor(CYAN);
cprintf("The police secretly filmed the conversation which he had with the head of the criminal underworld.\n");
char str1[]="The police secretly filmed the conversation which he had with the head of the criminal underworld.";
textcolor(YELLOW);
gotoxy(1,4);
delay(100);
cprintf("\n Press enter When ready !\n\n");
getch();
_setcursortype(_SOLIDCURSOR);
gotoxy(7,7);
int e=0;
time=0;
end=0;
start=0;
start=clock();
cin.getline(ch1,1000);
end=clock();
time=(end-start)/CLK_TCK;
for(i=0;i<strlen(ch1);i++)
{if(ch1[i]==str1[i])
e++;}
s2=time;
p2=strlen(ch1)-e;
//round3;
textcolor(CYAN);
clrscr();
char ch2[10000]="12343432";
_setcursortype(_NOCURSOR);
textcolor(YELLOW);
delay(500);
gotoxy(33,1);
cprintf("ROUND - 3");
gotoxy(1,3);
delay(1000);
textcolor(WHITE);
cprintf(" type: ");
delay(100);
textcolor(CYAN);
cprintf("\n Nasiruddin had a shed behind his house. It had no lights. One night he went to the shed and lost his ring there. He went out into the well-lit street and began to look around.");
char str2[]="Nasiruddin had a shed behind his house. It had no lights. One night he went to the shed and lost his ring there. He went out into the well-lit street and began to look around.";
textcolor(YELLOW);
gotoxy(1,7);
delay(500);
cprintf("\n Press enter When ready !\n\n");
getch();
_setcursortype(_SOLIDCURSOR);
gotoxy(1,6);
int t=0;
time=0;
end=0;
start=0;
start=clock();
gotoxy(9,9);
cin.getline(ch2,1000);
end=clock();
time=(end-start)/CLK_TCK;
for(i=0;i<strlen(ch2);i++)
{if(ch2[i]==str2[i])
t++;}s3=time;
p3=strlen(ch2)-t;
//round4;
textcolor(CYAN);
clrscr();
char ch3[10000]="1254435543";
_setcursortype(_NOCURSOR);
textcolor(YELLOW);
delay(500);
gotoxy(33,1);
cprintf("ROUND - 4");
gotoxy(34,2);
cout<<"Overlap !";
gotoxy(1,4);
delay(1000);
textcolor(WHITE);
cprintf(" type \n");
delay(100);
highvideo();
gotoxy(1,5);
textcolor(CYAN);
cprintf("The ancient Olympic Games were held every four years. One of the legends about the Olympics revolves around Hercules, the Greek hero. According to the story, the gods ordered Hercules to clean the Augean stables. The stables were filthy as they had not been cleaned for a year. Hercules was to finish the task in a single day. It was an impossible task for an ordinary man!\n");
char str3[]="The ancient Olympic Games were held every four years. One of the legends about the Olympics revolves around Hercules, the Greek hero. According to the story, the gods ordered Hercules to clean the Augean stables. The stables were filthy as they had not been cleaned for a year. Hercules was to finish the task in a single day. It was an impossible task for an ordinary man!";
textcolor(YELLOW);
gotoxy(1,3);
delay(500);
cprintf(" Press enter When ready !\n\n");
getch();
_setcursortype(_SOLIDCURSOR);
gotoxy(1,5);
int u=0;
time=0;
end=0;
start=0;
start=clock();
cin.getline(ch3,1000);
end=clock();
time=(end-start)/CLK_TCK;
for(i=0;i<strlen(ch3);i++)
{if(ch3[i]==str3[i])
u++;}
p4=strlen(ch3)-u;
s4=time;
clrscr();
fin();
clrscr();
int lu=strlen(ch0)+strlen(ch1)+strlen(ch2)+strlen(ch3);
float ul=s1+s2+s3+s4;
int strl=strlen(str)+strlen(str1)+strlen(str2)+strlen(str3);
speed=(strlen(ch0)+strlen(ch1)+strlen(ch2)+strlen(ch3))/(s1+s2+s3+s4);
total=p1+p2+p3+p4;
textcolor(YELLOW);clrscr();
stats();
delay(400);
gotoxy(17,3);
cout<<name;
delay(400);
gotoxy(17,4);
cout<<lu<<"/"<<strl;
delay(400);
gotoxy(17,5);
cout<<total;
delay(400);
gotoxy(17,6);
cout<<setprecision(2)<<ul;
delay(400);
gotoxy(17,7);
cout<<speed;
getch();
_setcursortype(_NORMALCURSOR);
char y;
gotoxy(17,9);
cout<<"Do u wish to try again ? (Y,N) ";
cin>>y;
if(y=='y'||y=='Y')
goto try;
else
{if(z==1)
break;
else
goto app; }
}//case 1 (typo) ending...
case 2:{ _setcursortype(_NOCURSOR);
read1();read2();
int a,ans;
m:
textcolor(GREEN);
_setcursortype(_NOCURSOR);clrscr();
cout<<"1. Keep a 2 digit number (20-99) in your mind.\n\n ex: 23";
getch();clrscr();
cout<<"2. Add them \n\n ex: 2+3= '5'";
getch();clrscr();
cout<<"3. Now subtract the obtained number from the initial number\n\n ex: 23-5= '18'";
getch();clrscr();
cout<<"4. Now you will be remained by 2 digits\n\n ex: 1 & 8";
getch();clrscr();
_setcursortype(_NORMALCURSOR);
cout<<"5. From these two digits \n\n ex: 1 or 8 \n\nType any number (only one not both the digits !)";
cout<<"\n";
cin>>a;
clrscr();
ans=9-a;
cout<<"\n \2 the other number is: "<<ans<<" \2";
delay(500);
gotoxy(1,5);
textcolor(CYAN);
cprintf("Surprised!!! ? Want to try again ? (Y,N)\n\n");
gotoxy(1,6);
char q;
cin>>q;
if(q=='y'||q=='Y')
goto m;
else
goto app; }//case 2 ending///
case 3:f();
goto app;
case 4:
drul();goto app;
case 5: guess(); goto app;
case 6:
textcolor(WHITE);
dayf();goto app;
case 7: vcricket();goto app;
case 8: explorer();
default:goto app; }//switch case ending!
}
//////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////
void main()
{
start();
}
///////////////////////////////////////////////////////////////////////////
void explorer()
{
e:
_setcursortype(_NORMALCURSOR);
textbackground(BLACK);
textcolor(WHITE);
clrscr();int j; s2time();
textcolor(GREEN);
for(int z=1;z<=80;z++)
{ gotoxy(z,2);
cprintf("_");}
textcolor(BLUE);
for(z=1;z<=25;z++)
{ gotoxy(64,z);
cprintf("³");}
gotoxy(4,1);
textcolor(CYAN);
cprintf("Explorer");
gotoxy(68,1);
cprintf("Menu");
textcolor(YELLOW);
gotoxy(4,6);
cprintf(" |^^^|");
gotoxy(4,7);
cprintf(" |___|");
textcolor(GREEN);
gotoxy(4,7);
cprintf("1.");
gotoxy(7,8);
cprintf("Apps");
textcolor(YELLOW);
gotoxy(14,6);
cprintf(" |^^^|");
gotoxy(14,7);
cprintf(" |___|");
textcolor(GREEN);
gotoxy(14,7);
cprintf("2.");
gotoxy(17,8);
cprintf(" New ");
gotoxy(17,9);
cprintf("folder");
gotoxy(66,4);
cprintf("3.About");
textcolor(RED);
gotoxy(66,6);
cprintf("4.Turn off\n");
//stime();
gotoxy(4,11);
cin>>j;
int p;char yes;
switch(j)
{case 1:
{f: clrscr();
s2time();
textcolor(GREEN);
for(int z=1;z<=80;z++)
{ gotoxy(z,2);
cprintf("_");}
textcolor(BLUE);
for(z=1;z<=25;z++)
{ gotoxy(64,z);
cprintf("³");}
gotoxy(4,1);
textcolor(CYAN);
cprintf("Explorer\n");
gotoxy(68,1);
cprintf("Menu");
textcolor(YELLOW);
gotoxy(4,6);
cprintf(" |^^^|");
gotoxy(4,7);
cprintf(" |___|");
textcolor(GREEN);
gotoxy(4,7);
cprintf("1.");
gotoxy(7,8);
cprintf("A.a.p");
gotoxy(66,4);
cprintf("2.Go back");
gotoxy(7,10);
cin>>p;
switch(p)
{case 1:{a.game(0);
goto e;
}
case 2:goto e;
default: cout<<"inv";goto f; }}
case 2:{textcolor(GREEN);
clrscr();cout<<"empty folder\n\n";textcolor(RED);
cprintf("Press any key to go back\n");
getch(); goto e;}
case 3:about();
////////////////////////////////////////////////////////////////////////
//case 4:clrscr();ps.get();getch();goto e;
case 4:{textcolor(YELLOW);clrscr();
textcolor(RED);
gotoxy(18,12);
cprintf("1. Shutdown");
textcolor(GREEN);
cprintf(" 2. Restart");
textcolor(CYAN);
cprintf(" 3. Jump To THE BEGINNING ");
cout<<"4.cancel";
int sh,z;
gotoxy(38,14);
cin>>sh;
if(sh==1)
{_setcursortype(_NOCURSOR);
textcolor(RED);
clrscr();
for(z=0;z<4;z++)
{textcolor(RED);highvideo(); clrscr();gotoxy(28,12);
cout<<"Deleting your settings";
delay(100);cout<<".";delay(100);cout<<".";delay(100);cout<<".";
delay(50);
}
for(z=0;z<4;z++)
{textcolor(RED);highvideo(); clrscr();gotoxy(28,12);
cout<<"System is shuting down";
delay(100);cout<<".";delay(100);cout<<".";delay(100);cout<<".";
delay(50);
}
delay(20);clrscr();
exit(0);
}
else if(sh==2)
{_setcursortype(_NOCURSOR);
textcolor(GREEN);
clrscr();
for(z=0;z<4;z++)
{clrscr();gotoxy(28,12); cout<<"Saving your settings";
delay(100);cout<<".";delay(100);cout<<".";delay(100);cout<<".";
delay(50);
}
for(z=0;z<4;z++)
{clrscr();gotoxy(28,12); cout<<"System restarting";
delay(100);cout<<".";delay(100);cout<<".";delay(100);cout<<".";
delay(50);
}
osload();
goto e; }
else if(sh==3)
{_setcursortype(_NOCURSOR);
clrscr();
start();
goto e; }
else
goto e;
}
default: goto e;}
}
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
void start()
{s:
int choice;
long int coin,n,b1=0,b2=0,b3=0,b4=0;
start:_setcursortype(_NORMALCURSOR);
ifstream coins("Coins");
coins>>n;
if(n>100000)
{ofstream coi("Coins"); n=0;
coi<<n;}
textbackground(BLACK);
textcolor(3);
clrscr();
clrscr();
textcolor(YELLOW);
cprintf("PLAY, EARN & UNLOCK");cout<<"\n\n";
textcolor(BROWN);
cprintf("coins= ");
cout<<n<<"\n\n";
cout<<"1.Earn\n2.Unlock\n3.Exit!\n\n";
textcolor(GREEN);
cprintf("UNLOCKABLES");textcolor(RED);gotoxy(50,10);cprintf("9.RESET PROGRESS !");
cout<<"\n\n5.Load .H Operating System\n6.Typo (typing app)\n7.Virtua Cricket\n8.Day finder\n";
cin>>choice; int c;
switch(choice)
{case 1:c=fall(0);
ifstream coins("Coins");
ofstream coi("Coins");
coins>>n;
n+=c;
coi<<n;
coins.close();
coi.close();
goto start;
case 2:int buy;
textcolor(LIGHTGREEN);
clrscr();
cout<<"1 .H Operating System [collection of all apps] - 50 coins\n\n2 Typo - 30 coins\n\n";
cout<<"3 Virtua Cricket - 30 coins\n\n4 Day finder - 10 coins\n\n";
cout<<"5 Go Back\n\n";
cin>>buy;if(buy==5) goto start;
coins>>n;
if(buy==1&&n>=50)
{cout<<"Purchase succesful !\n";n-=50;ofstream coi("Coins");
coi<<n;b1=1;coi.close();ofstream unl1("u1");unl1<<b1;unl1.close();
}
else if(buy==2&&n>=30)
{cout<<"Purchase succesful !\n";n-=30;
ofstream coi("Coins");
coi<<n;b2=1;coi.close();ofstream unl2("u2");unl2<<b2;unl2.close();
}
else if(buy==3&&n>=30)
{ofstream coi("Coins");
cout<<"Purchase succesful !\n";n-=30;
coi<<n; b3=1;coi.close();ofstream unl3("u3");unl3<<b3;unl3.close();
}
else if(buy==4&&n>=10)
{ofstream coi("Coins");
cout<<"Purchase succesful !\n";n-=10;
coi<<n; b4=1;coi.close();ofstream unl4("u4");unl4<<b4;unl4.close();
}
else
cout<<"\nNoT Enough Coins\n"; getch();coi.close();coins.close();
goto s;
case 3:break;
case 4:int ha;
textcolor(LIGHTGRAY); clrscr();
for(int i=0;i<=2715;i++)
{ha=random(2);
if(i==2000)
cout<<7;
if(i==2200)
cout<<6;
if(i==2400)
cout<<9;
if(i==2600)
cout<<8;
else
cout<<ha;delay(1);
}
int j,a=0;
gotoxy(32,8);
textcolor(RED);
cprintf("Enter password");
gotoxy(38,10);
cprintf("----");
gotoxy(38,10);
cin>>a;
if(a==7698)
{textcolor(GREEN+BLINK);
gotoxy(32,12);
cprintf("HACK Successfull");getch();}
else
{textcolor(RED+BLINK);
gotoxy(34,12);
cprintf("HACK FAILED");getch();}
textcolor(GREEN);
clrscr();
if(a==7698)
{ifstream coins("Coins");
coins>>n;
cout<<"Current coins= "<<n<<" \n\n";
cout<<"ENTER AMOUNT TO ADD (Limit: 10000)\n";
cin>>coin;
n+=coin;
ofstream coi("Coins");
coi<<n;
coi.close();
coins.close();
goto start;}
goto start;
case 5: clrscr();
ifstream un1("u1");
un1>>b1;
if(b1==1)
{osload();
login();
explorer();}
else
{cout<<"BuY and then Open\n";
getch();
}
un1.close();
goto start;
case 6:clrscr();
ifstream un2("u2");
un2>>b2;
if(b2==1)
{app k;
k.game(1);}
else
{cout<<"BuY and then Open\n";
getch();
}
un2.close();
goto start;
case 7: clrscr();
ifstream un3("u3");
un3>>b3;
if(b3==1)
vcricket();
else
{cout<<"BuY and then Open\n";
getch();
}
un3.close();
goto start;
case 8:
textcolor(CYAN);
clrscr();
ifstream un4("u4");
un4>>b4;
if(b4==1)
dayf();
else
{cout<<"BuY and then Open\n";
getch();
}
un4.close();
goto start;
case 9:clrscr();int res;
cout<<"Are You Sure You Want To RESET Your Current Progress ?\n";
cout<<"\n1.Yes\t\t2.No\n";
cin>>res;
if(res==1)
{fall(1);
int reset1,reset2,reset3,reset4,reset5,reset6,reset7;
ifstream coins("Coins");
coins>>reset1;reset1=0;
ofstream coi("Coins");
coi<<reset1;
ifstream un1("u1");
un1>>reset2;reset2=0;
ofstream unl1("u1");
unl1<<reset2;
ifstream un2("u2");
un2>>reset3;reset3=0;
ofstream unl2("u2");
unl2<<reset3;
ifstream un3("u3");
un3>>reset4;reset4=0;
ofstream unl3("u3");
unl3<<reset4;
ifstream un4("u4");
un4>>reset5;reset5=0;
ofstream unl4("u4");
unl4<<reset5;
goto start;}
else
goto start;
default:goto start;}/////////switch ending...
ofstream coi("Coins");
coi<<n;
coins.close();
coi.close();exit(0);
}
void osload()
{_setcursortype(_NOCURSOR);
textcolor(CYAN);
clrscr();
highvideo();
gotoxy(30,10);
cout<<" Operating system ";
gotoxy(28,10);
textcolor(GREEN);
cprintf(".h");
textcolor(RED);
gotoxy(30,11);
cprintf(" 2014 Basic");
for(int i=1;i<=80;i++)
{delay(50);
textattr(16);
gotoxy(i,24);
cprintf(" ");
}}
int fall(int rese)
{int h;int point;
ifstream high1("Bsttt");
high1>>point; high1.close();
if(point>10000)
{ofstream high("Bsttt");
point=0;high<<point;high.close();}
if(rese==0)
{
ifstream high1("Bsttt");
high1>>point;
h=point;
textcolor(LIGHTGREEN);
clrscr();
cout<<"Just type letters you see to earn coins\n\n";
cout<<"Each point is equal to 1 coin !\1";getch();
randomize();
int a;point=0;
for(int i=1;i<=1000;i++)
{textcolor(LIGHTGREEN);
_setcursortype(_NOCURSOR);
clrscr();int n=(random(25)+97);
char ch=n;
int d,q=random(40)+3,w=random(40)+3;
textcolor(LIGHTMAGENTA);
gotoxy(45,1);
cprintf("points= ");
gotoxy(54,1);
cout<<point;
cout<<"\n";
gotoxy(q,w+1);
cout<<ch;
a=getch(); d=a;
if(d==n)
point++;
else
goto e;
}e: clrscr();
if(h<point)
{ofstream high("Bsttt");
h=point;
high<<h;
high.close();
}
high1>>h;
high1.close();
gotoxy(38,12);
{textcolor(WHITE+BLINK);
cprintf("GAME OVER");}
gotoxy(40,14);
cout<<"points= "<<point;
if(point>=h)
h=point;
gotoxy(40,16);
cout<<"High score= "<<h;
getch();
}
else if(rese==1)
{int p;
ifstream high1("Bsttt");
high1>>p; p=0;
ofstream high("Bsttt");
high<<p;high1.close();high.close();
}
return point;}
void about()
{_setcursortype(_NOCURSOR);
textcolor(LIGHTRED);
clrscr();
gotoxy(1,1);
cprintf("O.S name : ");
textcolor(GREEN);
cprintf(".h");
textattr(3);
cout<<"\n\nProgrammer : ";cprintf("Abhishek.K");
gotoxy(1,8);
textcolor(LIGHTBLUE);
cprintf("\n--> A simple and basic theme of Simple Operating system using C & C++");
getch();
explorer();}
void stats()
{textcolor(GREEN);
gotoxy(35,1);
cprintf("Player stats");
gotoxy(1,3);
cprintf(" Player name : ");
gotoxy(1,4);
cprintf(" Letters typed: ");
gotoxy(1,5);
cprintf(" Wrongly typed: ");
gotoxy(1,6);
cprintf(" Total Time : ");
gotoxy(22,6);
cprintf("s");
gotoxy(1,7);
cprintf(" Typing speed : ");
gotoxy(21,7);
cprintf("l/s");
}
void gameover()
{textcolor(RED+BLINK);
clrscr();
_setcursortype(_NOCURSOR);
gotoxy(30,10);
cout<<"GAME OVER !!!";
getch();}
void typo()
{textbackground(BLACK);
textcolor(GREEN);
_setcursortype(_NOCURSOR);
clrscr();
cout<<"\n\n\n\n";
cout<<" TTTTTTTTTT YYY YYY PPPPPPPPPP OOOOOOOOOOOOO\n";
cout<<" TTTTTTTTTT YYY YYY PPPPPPPPPP OOOOOOOOOOOOO\n";
cout<<" TT YYY YYY PP PP OOO OOO\n";
cout<<" TT YYY YYY PP PP OOO OOO\n";
cout<<" TT YYYYYYYY PPPPPPPPPP OOO OOO \n";
cout<<" TT YYYYYY PPPPPPPPPP OOO OOO \n";
cout<<" TT YY PP OOO OOO \n";
cout<<" TT YY PP OOO OOO \n";
cout<<" TT YY PP OOO OOO \n";
cout<<" TT YY PP OOOOOOOOOOOOO \n";
cout<<" TT YY PP OOOOOOOOOOOOO\n";
textcolor(CYAN);
cout<<"\n\n";
gotoxy(32,17);
delay(200);
highvideo();
cprintf("It's not about how U type,\n");
gotoxy(42,19);
delay(200);
cprintf("It's about how FAST u type !");
getch();}
void del()
{_setcursortype(_NOCURSOR);
textcolor(GREEN);clrscr();
cout<<"\n\n\n\n";
delay(500);
cout<<" TTTTTTTTTT YYY YYY PPPPPPPPPP OOOOOOOOOOOOO\n";
delay(200);
cout<<" TTTTTTTTTT YYY YYY PPPPPPPPPP OOOOOOOOOOOOO\n";
delay(185);
cout<<" TT YYY YYY PP PP OOO OOO\n";
delay(165);
cout<<" TT YYY YYY PP PP OOO OOO\n";
delay(145);
cout<<" TT YYYYYYYY PPPPPPPPPP OOO OOO \n";
delay(125);
cout<<" TT YYYYYY PPPPPPPPPP OOO OOO \n";
delay(105);
cout<<" TT YY PP OOO OOO \n";
delay(95);
cout<<" TT YY PP OOO OOO \n";
delay(75);
cout<<" TT YY PP OOO OOO \n";
delay(55);
cout<<" TT YY PP OOOOOOOOOOOOO \n";
delay(25);
cout<<" TT YY PP OOOOOOOOOOOOO\n";
clrscr();}
void blin()
{textbackground(BLACK);
textcolor(GREEN+BLINK);
_setcursortype(_NOCURSOR);
clrscr();
cout<<"\n\n\n\n";
cout<<" TTTTTTTTTT YYY YYY PPPPPPPPPP OOOOOOOOOOOOO\n";
cout<<" TTTTTTTTTT YYY YYY PPPPPPPPPP OOOOOOOOOOOOO\n";
cout<<" TT YYY YYY PP PP OOO OOO\n";
cout<<" TT YYY YYY PP PP OOO OOO\n";
cout<<" TT YYYYYYYY PPPPPPPPPP OOO OOO \n";
cout<<" TT YYYYYY PPPPPPPPPP OOO OOO \n";
cout<<" TT YY PP OOO OOO \n";
cout<<" TT YY PP OOO OOO \n";
cout<<" TT YY PP OOO OOO \n";
cout<<" TT YY PP OOOOOOOOOOOOO \n";
cout<<" TT YY PP OOOOOOOOOOOOO\n";
delay(1500); clrscr();}
void read1()
{clrscr();
_setcursortype(_NOCURSOR);
gotoxy(30,10);
cout<<"LOADING";
for(int i=0;i<7;i++)
{clrscr();gotoxy(30,10); cout<<"Loading Mind Freak";
delay(100);cout<<".";delay(100);cout<<".";delay(100);cout<<".";
delay(50);
}}
void read2()
{clrscr();
_setcursortype(_NOCURSOR);
gotoxy(30,10);
cout<<"LOADING";
for(int i=0;i<8;i++)
{clrscr();gotoxy(30,10); cout<<"Loading Mind readers";
delay(100);cout<<".";delay(100);cout<<".";delay(100);cout<<".";
delay(50);
} }
void inst()
{
textcolor(RED+BLINK);
gotoxy(31,1);
cprintf("---INSTRUCTIONS---");
textcolor(CYAN);
{
gotoxy(1,2);
cprintf("\n\n 1. This App consists of 4 rounds.\n");
gotoxy(1,4);
cprintf("\n\n 2. Each space given between each word, Matters a lot (be aware) !\n");
gotoxy(1,6);
cprintf("\n\n 3. Use enter key to start and end the TIMER.\n");
gotoxy(1,8);
cprintf("\n\n 4. Don't forget to use upper cases wherever needed !\n");
gotoxy(1,10);
cprintf("\n\n 5. The last round is an overlaping round where the words typed are overlaped \n on the printed passage!\n");
gotoxy(1,12);
cprintf("\n\n 6. If a BLINKING CURSOR appears then it says that the time count has started ! ");
gotoxy(1,14);
_setcursortype(_SOLIDCURSOR);
cprintf("\n\n BLINKING CURSOR, ex: ");
}getch();}
void load1()
{clrscr();
_setcursortype(_NOCURSOR);
gotoxy(30,10);
cout<<"LOADING";
for(int i=0;i<4;i++)
{clrscr();gotoxy(30,10); cout<<"Loading TYPO";
delay(100);cout<<".";delay(100);cout<<".";delay(100);cout<<".";
delay(50);
}}
void load2()
{clrscr();
_setcursortype(_NOCURSOR);
gotoxy(30,10);
cout<<"LOADING";
for(int i=0;i<4;i++)
{clrscr();gotoxy(30,10); cout<<"Loading Characters";
delay(100);cout<<".";delay(100);cout<<".";delay(100);cout<<".";
delay(50);