/*****************************C*R*O*S*S*W*O*R*D******************************/ /***************************************************************************** #include //DELAY,//sound #include #include #include #include #include #include #include //RANDOM #include #include #include /**************F*U*N*T*I*O*N**I*N*I*T*I*A*L*I*S*A*T*I*O*N********************/ void nm() ; void bye() ; void load() ; void make() ; void over() ; void sart() ; void watch() ; void sar() ; void display() ; void choose(char) ; void border() ; void border1(int) ; int cluesa(int) ; void Putpixel() ; int cluesd(int) ; void halloffame() ; void instructions() ; int checka1 (char a1[10],int) ; int checkd1 (char d1[10],int) ; int checka2 (char a2[10],int) ; int checkd2 (char d2[10],int) ; int checka3 (char a3[10],int) ; int checkd3 (char d3[10],int) ; int checka4 (char a4[10],int) ; int checkd4 (char d4[10],int) ; int checka5 (char a5[10],int) ; int checkd5 (char d5[10],int) ; int checka6 (char a6[10],int) ; int checkd6 (char d6[10],int) ; int checka7 (char a7[10],int) ; int checkd7 (char d7[10],int) ; int checka8 (char a8[10],int) ; int checkd8 (char d8[10],int) ; int checka9 (char a9[10],int) ; int checkd9 (char d9[10],int) ; int checka10 (char a10[10],int); int checkd10 (char d10[10],int); int checkd11 (char d11[10],int); int checkd12 (char d12[10],int); fstream myfile ; /**********************C*L*A*S*S**D*E*C*L*E*R*A*T*I*O*N**********************/ class hall { char name[20] ; int code ; int sco ; public: void nme() ; void show() ; void enter(int) ; void score(int) ; void sort() ; void show(int) ; } ; hall ha ; /*****************************M***A***I***N**********************************/ void main() { int driver=DETECT,mode; initgraph(&driver,&mode,"C:\\HELL\\lang\\turboc3\\bgi "); load() ; sar() ; getch(); closegraph() ; } /********************************M*E*N*U************************************/ void sar() { cleardevice() ; setbkcolor(BLACK) ; char c ; setlinestyle(SOLID_LINE,1,1) ; rectangle(1,1,638,478) ; rectangle(3,3,636,476) ; int y=14 ; setcolor(LIGHTRED) ; settextstyle(TRIPLEX_FONT,HORIZ_DIR,4); outtextxy(154,4,"STUCK IN THE WEB") ; settextstyle(BOLD_FONT,HORIZ_DIR,4); setcolor(YELLOW) ; outtextxy(194,64,"N") ; outtextxy(200,144,"I") ; outtextxy(194,224,"H") ; outtextxy(194,304,"A") ; outtextxy(194,384,"E") ; settextstyle(TRIPLEX_FONT,HORIZ_DIR,2); setcolor(CYAN) ; outtextxy(194,104," EW GAME "); outtextxy(194,184," NSTRUCTIONS"); outtextxy(194,264," ALL OF FAME"); outtextxy(194,344," NSWER TO CROSSWORD "); outtextxy(194,424," XIT"); while(!kbhit()) { setcolor(y) ; for (int i=0;i<=479;i=i+10) { if(!kbhit()) { arc(300,10,180,0,i); delay(50) ; } } y++ ; } c=getch() ; choose(c); getch(); } /************************S*T*A*R*T**G*A*M*E**********************************/ void load() { setcolor(MAGENTA) ; settextstyle(TRIPLEX_FONT,HORIZ_DIR,8) ; setlinestyle(DOTTED_LINE,1,3) ; line(320,65,370,140) ; line(370,65,320,140) ; setlinestyle(DOTTED_LINE,1,3) ; line(184,65,234,140) ; line(234,65,184,140) ; setlinestyle(DOTTED_LINE,1,3) ; line(458,65,508,140) ; line(508,65,458,140) ; setlinestyle(SOLID_LINE,1,1) ; setcolor(BROWN) ; outtextxy(230,50,"WO RD") ; setcolor(CYAN) ; outtextxy(100,140,"Loading Now... ") ; settextstyle(TRIPLEX_FONT,HORIZ_DIR,2) ; setcolor(LIGHTBLUE) ; outtextxy(250,240,"Please Stand By ") ; setcolor(GREEN) ; rectangle(10,400,610,460) ; delay(600) ; setcolor(RED) ; rectangle(13,403,213,457) ; setcolor(YELLOW) ; for(int w=13 ; w<=213 ;w++) line(w,403,w,457) ; delay(900) ; setcolor(RED) ; rectangle(213,403,400,457) ; setcolor(YELLOW) ; for(w=213 ; w<=400 ;w++) line(w,403,w,457) ; delay(900) ; setcolor(RED) ; rectangle(400,403,607,457) ; setcolor(YELLOW) ; for(w=400 ; w<=607 ;w++) line(w,403,w,457) ; delay(300) ; setcolor(WHITE) ; } /*********************************S*T*A*R*T**********************************/ void sart() { int j ; setcolor(CYAN) ; for(int i=10 ; i>=4 ; i--) { cleardevice() ; settextstyle(TRIPLEX_FONT,HORIZ_DIR,i); outtextxy(250,204,"CROSS") ; delay(150) ; } delay(150) ; setcolor(MAGENTA) ; for(i=10 ; i>=4 ; i--) { cleardevice() ; settextstyle(TRIPLEX_FONT,HORIZ_DIR,i); outtextxy(250,204,"WORD") ; delay(150) ; } delay(150) ; setcolor(YELLOW) ; for(i=10,j=0 ; i>=4,j<15 ; i--,j++) { cleardevice() ; if(j-2!=0) { setcolor(j-2) ; settextstyle(TRIPLEX_FONT,HORIZ_DIR,i); outtextxy(220,204,"CROSS WORD") ; delay(250) ; if(i==4) break ; } } setcolor(BLUE) ; settextstyle(SCRIPT_FONT,HORIZ_DIR,1) ; delay(1200) ; outtextxy(290,240,"- The") ; //sound(1000) ; delay(1200) ; setcolor(GREEN) ; outtextxy(360,240,"Ultimate") ; //sound(1500) ; delay(1200) ; setcolor(LIGHTMAGENTA) ; outtextxy(430,240,"Challange") ; //sound(2000) ; delay(500) ; //nosound() ; cleardevice() ; setcolor(CYAN) ; int x[10],y[10]; int x_center=300,y_center=240,rad=100; for(i=0;i<10;i++) { x[i]=x_center+rad*cos(36*i*3.14159/180) ; y[i]=y_center+rad*sin(36*i*3.14159/180) ; } for(i=0 ;i<10 ;i++) for(j=0 ;j<10 ;j++) line(x[i],y[i],x[j],y[j] ) ; settextstyle(TRIPLEX_FONT,HORIZ_DIR,1); outtextxy(420,300,"Copyright") ; outtextxy(440,320,"1999") ; setcolor(LIGHTGREEN) ; outtextxy(380,360," Shobhit Mathur"); setcolor(LIGHTBLUE) ; outtextxy(380,400," Dilip Seshadri"); setcolor(LIGHTRED) ; outtextxy(380,440," Saurabh Kaushik"); delay(1550) ; } /********************************C*H*O*O*S*E********************************/ void choose(char c) { cleardevice() ; switch(c) { case 'n': nm() ; watch() ; make() ; clock_t start, end; start = clock(); int sun=0,sum=0,sun1=0 ; sun=cluesa(sum); sun1=cluesd(sum); end = clock(); settextstyle(TRIPLEX_FONT,HORIZ_DIR,1) ; setcolor(GREEN) ; setlinestyle(DOTTED_LINE,1,3) ; cleardevice() ; border() ; outtextxy(60,217,"The time you took to solve the crossword was::") ; gotoxy(64,15) ; cout<<(end - start) / (CLK_TCK)<<"sec."; setlinestyle(SOLID_LINE,1,1) ; getch() ; display(); int d=sun+sun1 ; ha.score(d) ; halloffame() ; over(); break ; case 'i': instructions() ; sar() ; break ; case 'h': halloffame() ; sar() ; break ; case 'a': display() ; sar() ; break ; case 'e': bye() ; exit(0) ; case 'N': { nm() ; watch() ; make() ; clock_t start, end; start = clock(); int sun=0,sum=0,sun1=0 ; sun=cluesa(sum); sun1=cluesd(sum); end = clock(); settextstyle(TRIPLEX_FONT,HORIZ_DIR,1) ; setcolor(GREEN) ; setlinestyle(DOTTED_LINE,1,3) ; cleardevice() ; border() ; outtextxy(60,217,"The time you took to solve the crossword was::") ; gotoxy(64,15) ; cout<<(end - start) / (CLK_TCK)<<"sec."; setlinestyle(SOLID_LINE,1,1) ; getch() ; display(); int d=sun+sun1 ; ha.score(d) ; halloffame() ; over(); break ; } case 'I': instructions() ; sar() ; break ; case 'H': halloffame() ; sar() ; break ; case 'A': display() ; sar() ; break ; case 'E': bye() ; exit(0) ; default : sar() ; } } /************************I*N*S*T*R*U*C*T*I*O*N*S*****************************/ void instructions() { cleardevice() ; setcolor(LIGHTBLUE) ; setlinestyle(DOTTED_LINE,1,3) ; rectangle(8,8,627,467) ; rectangle(10,10,625,465) ; setcolor(CYAN) ; settextstyle(COMPLEX_FONT,HORIZ_DIR,5) ; outtextxy(50,10,"I N S T R U T I O N S ") ; setcolor(YELLOW) ; line(45,40,600,40) ; line(580,30,600,40) ; line(600,40,580,50) ; line(45,40,25,20) ; line(25,20,25,60) ; line(45,40,25,60) ; settextstyle(TRIPLEX_FONT,HORIZ_DIR,1) ; setcolor(LIGHTGRAY) ; outtextxy(60,70,"(1)FOR EVERY CORRECT ANSWER YOU WILL GET 1 POINT.") ; outtextxy(60,110,"(2)FIRST YOU WILL GET THE CLUES FOR 'ACROSS' BELOW") ; outtextxy(80,130,"THE CROSSWORD."); outtextxy(60,160,"(a)THESE CLUES WILL BE STARTING WITH A SMALL ALPHABET") ; outtextxy(80,180,"eg.(a),(b),(c)... WHICH YOU CAN SPOT ON THE CROSSWORD") ; outtextxy(60,230,"(3)THEN YOU WILL GET CLUES FOR 'DOWN' ON THE RIGHT") ; outtextxy(80,250,"SIDE OF THE CROSSWORD.") ; outtextxy(60,300,"(a)THEY WILL BE STARTING FROM (1),(2),(3)...etc. WHICH YOU") ; outtextxy(70,320," CAN ALSO SPOT ON THE CROSSWORD.") ; outtextxy(60,360,"(4)AFTER THE GAME IS OVER PRESS ANY KEY AND" ); outtextxy(70,380," ANSWERS WILL BE DISPLAYED ON A MAGNIFIED CROSSWORD."); settextstyle(SANS_SERIF_FONT,HORIZ_DIR,2) ; setcolor(LIGHTMAGENTA) ; outtextxy(90,400," ÷ ÷ ÷SO SET YOUR BRAIN MUSCLES INTACT÷ ÷ ÷ "); setcolor(LIGHTGREEN) ; outtextxy(150,440,"® ® ®THE BALL IS ABOUT TO ROLL¯ ¯ ¯"); getch(); } /************************S*T*A*R*T**W*A*T*C*H********************************/ void watch() { cleardevice() ; delay(100) ; setviewport(0,310,639,479,1) ; settextstyle(TRIPLEX_FONT,HORIZ_DIR,4) ; setcolor(MAGENTA) ; outtextxy(10,67,"Y o u r S t a r t s "); setcolor(LIGHTRED) ; outtextxy(140,67," T I M E") ; setviewport(1,1,639,300,1) ; setlinestyle(SOLID_LINE,1,3) ; setcolor(BLUE) ; circle(300,170,120) ; circle(300,170,3) ; settextstyle(SMALL_FONT,0,4); outtextxy(182,170,"9"); outtextxy(413,170,"3"); outtextxy(297,52,"12"); outtextxy(300,280,"6"); line(300,170,420,170); line(420,170,400,190); line(420,170,400,150); line(400,190,400,150); delay(500); setviewport(0,310,639,479,1); settextstyle(TRIPLEX_FONT,0,4); setcolor(YELLOW); outtextxy(510,67,"N"); setviewport(1,1,639,300,1); clearviewport(); setcolor(BLUE); circle(300,170,120); circle(300,170,3); settextstyle(SMALL_FONT,0,3); outtextxy(182,170,"9"); outtextxy(413,170,"3"); outtextxy(297,52,"12"); outtextxy(300,280,"6"); line(300,170,300,290); line(300,290,280,270); line(300,290,320,270); line(280,270,320,270); delay(500); setviewport(0,310,639,479,1); settextstyle(TRIPLEX_FONT,0,4); setcolor(BROWN); outtextxy(550,67,"O"); setviewport(1,1,639,300,1) ; clearviewport() ; setcolor(BLUE) ; circle(300,170,120) ; circle(300,170,3) ; settextstyle(SMALL_FONT,0,3); outtextxy(182,170,"9"); outtextxy(413,170,"3"); outtextxy(297,52,"12"); outtextxy(300,280,"6"); line(300,170,180,170) ; line(180,170,200,150) ; line(180,170,200,190) ; line(200,150,200,190) ; delay(500) ; setviewport(0,310,639,479,1) ; settextstyle(TRIPLEX_FONT,0,4); setcolor(CYAN) ; outtextxy(590,67,"W"); setviewport(1,1,639,300,1) ; clearviewport() ; setcolor(BLUE) ; circle(300,170,120) ; circle(300,170,3); settextstyle(SMALL_FONT,HORIZ_DIR,3) ; outtextxy(182,170,"9") ; outtextxy(413,170,"3") ; outtextxy(297,52,"12") ; outtextxy(300,280,"6") ; delay(500) ; //sound(2900) ; delay(400) ; //nosound() ; setviewport(1,1,639,479,1) ; setlinestyle(SOLID_LINE,1,1) ; } /*****************************C*O*N*S*T*R*U*C*T******************************/ void make() { cleardevice() ; int MaxX,MaxY ; border1(15) ; setcolor(WHITE) ; Putpixel() ; setviewport(1,1,639,479,1) ; rectangle(10,10,303,226); int i=43 ; while(i<=268) { line(i,10,i,226) ; i=i+37; } for(int j=37 ; j<=226 ; j=j+27) line(10,j,303,j) ; settextstyle(SMALL_FONT,HORIZ_DIR,4) ; outtextxy(11,27,"a") ; outtextxy(82,81,"b") ; outtextxy(11,108,"c") ; outtextxy(158,135,"d") ; outtextxy(45,162,"e") ; outtextxy(231,162,"f") ; outtextxy(11,186,"g") ; outtextxy(156,188,"h") ; outtextxy(45,216,"i") ; outtextxy(231,214,"j") ; outtextxy(11,11,"1") ; outtextxy(43,11,"2") ; outtextxy(83,11,"3") ; outtextxy(118,11,"4") ; outtextxy(155,11,"5") ; outtextxy(193,11,"6") ; outtextxy(231,11,"7") ; outtextxy(231,117,"8") ; outtextxy(268,11,"9") ; outtextxy(43,145,"10") ; outtextxy(156,115,"11") ; outtextxy(117,145,"12") ; for(int q=43 ; q<=80 ; q++) line(q,64,q,91) ; for(q=155 ; q<=193 ; q++) line(q,64,q,118) ; for(q=10 ; q<=43 ; q++) line(q,199,q,226) ; for(q=10 ; q<=43 ; q++) line(q,145,q,172) ; for(q=191 ; q<=228 ; q++) line(q,145,q,172) ; for(q=191 ; q<=228 ; q++) line(q,198,q,226) ; for(q=228 ; q<=265 ; q++) line(q,91,q,118) ; for(q=265 ; q<=303 ; q++) line(q,172,q,199) ; for(q=117 ; q<=155 ; q++) line(q,118,q,145) ; for(q=43 ; q<=80 ; q++) line(q,118,q,145) ; } /*****************************B*A*C*K*G*R*O*U*N*D****************************/ void Putpixel() { int i, x, y, h, w, color; setviewport(10,10,625,465,0) ; struct viewporttype vp; getviewsettings( &vp ); h = vp.bottom - vp.top; w = vp.right - vp.left; int MaxColors ; for( i=0 ; i<3000 ; ++i ) { x = 1 + random( w - 1 ); y = 1 + random( h - 1 ); color = random( MaxColors ); putpixel( x, y, color ); } for( i=0 ; i<3000 ; ++i ) { x = 1 + random( w - 1 ); y = 1 + random( h - 1 ); color = getpixel( x, y ); if( color == random( MaxColors ) ) putpixel( x, y, 0 ); } } /**************************C*L*U*E*S**A*C*R*O*S*S****************************/ int cluesa(int sum=0) { int r=0 ; char a1[10] ; char a2[10] ; char a3[10] ; char a4[10] ; char a5[10] ; char a6[10] ; char a7[10] ; char a8[10] ; char a9[10] ; char a10[10] ; outtextxy(10,225,"a)EPITOME:: ") ; gotoxy(12,15) ; gets(a1); sum+=checka1(a1,r); outtextxy(10,241,"b)RHYMING WITH PIN:: ") ; gotoxy(17,16) ; gets(a2) ; sum+=checka2(a2,r); outtextxy(10,257,"c)NOBLE MAN ,KING::") ; gotoxy(17,17) ; gets(a3) ; sum+=checka3(a3,r); outtextxy(10,273,"d) 8 BIT STRUCTURE::") ; gotoxy(18,18) ; gets(a4) ; sum+=checka4(a4,r); outtextxy(10,289,"e) TO COME OFF IN FLAKES::") ; gotoxy(22,19) ; gets(a5) ; sum+=checka5(a5,r); outtextxy(10,305,"f) ALTERNATIVE::" ); gotoxy(14,20) ; gets(a6) ; sum+=checka6(a6,r); outtextxy(10,321,"g)TO LOOK FOR::") ; gotoxy(15,21) ; gets(a7) ; sum+=checka7(a7,r); outtextxy(10,337,"h)NIGHT WATCHMAN WITH BOLD EYES::" ); gotoxy(27,22) ; gets(a8) ; sum+=checka8(a8,r); outtextxy(10,353,"i)TO CHEW::") ; gotoxy(13,23) ; gets(a9) ; sum+=checka9(a9,r); outtextxy(10,369,"j)TO CARRY OUT::") ; gotoxy(16,24) ; gets(a10) ; sum+=checka10(a10,r); return sum ; } /******************************C*H*E*C*K**A*1********************************/ int checka1(char a1[],int r=0) { setcolor(15) ; char b1[9]="ULTIMATE"; char b2[9]="ultimate"; if(strcmp(a1,b1)==0||strcmp(a1,b2)==0) { r++ ; outtextxy(24,19,"U"); delay(150) ; //sound(1900) ; delay(80) ; //nosound() ; outtextxy(62,19,"L"); delay(150) ; //sound(2000) ; delay(80) ; //nosound() ; outtextxy(94,19,"T"); delay(150) ; //sound(2010) ; delay(80) ; //nosound() ; outtextxy(131,19,"I"); delay(150) ; //sound(2020) ; delay(80) ; //nosound() ; outtextxy(169,19,"M"); delay(150) ; //sound(2030) ; delay(80) ; //nosound() ; outtextxy(206,19,"A"); delay(150) ; //sound(2040) ; delay(80) ; //nosound() ; outtextxy(244,19,"T"); delay(150) ; //sound(2050) ; delay(80) ; //nosound() ; outtextxy(276,19,"E"); delay(150) ; //sound(2060) ; delay(80) ; //nosound() ; } else { outtextxy(150,233,"THE ANSWER IS WRONG"); delay(150) ; //sound(2500) ; delay(100) ; //nosound() ; } border1(2) ; return r ; } /******************************C*H*E*C*K**A*2********************************/ int checka2(char a2[],int r=0) { setcolor(3) ; char b1[3]="IN"; char b2[3]="in"; if(strcmp(a2,b1)==0||strcmp(a2,b2)==0) { r++ ; outtextxy(94,73,"I"); delay(150) ; //sound(1900) ; delay(80) ; //nosound() ; outtextxy(131,74,"N"); delay(150) ; //sound(1900) ; delay(80) ; //nosound() ; } else { outtextxy(150,249,"THE ANSWER IS WRONG"); delay(150) ; //sound(2500) ; delay(100) ; //nosound() ; } border1(3) ; return r ; } /******************************C*H*E*C*K**A*3********************************/ int checka3(char a3[],int r=0) { setcolor(4) ; char b1[5]="LORD"; char b2[5]="lord"; if(strcmp(a3,b1)==0||strcmp(a3,b2)==0) { r++ ; outtextxy(24,99,"L"); delay(150) ; //sound(1900) ; delay(80) ; //nosound() ; outtextxy(52,99,"O"); delay(150) ; //sound(1900) ; delay(80) ; //nosound() ; outtextxy(94,99,"R"); delay(150) ; //sound(1900) ; delay(80) ; //nosound() ; outtextxy(131,99,"D"); delay(150) ; //sound(1900) ; delay(80) ; //nosound() ; } else { outtextxy(150,265,"THE ANSWER IS WRONG"); delay(150) ; //sound(2500) ; delay(100) ; //nosound() ; } border1(4) ; return r ; } /******************************C*H*E*C*K**A*4********************************/ int checka4(char a4[],int r=0) { setcolor(5) ; char b1[5]="BYTE"; char b2[5]="byte"; if(strcmp(a4,b1)==0||strcmp(a4,b2)==0) { r++ ; outtextxy(169,127,"B"); delay(150) ; //sound(1900) ; delay(80) ; //nosound() ; outtextxy(206,127,"Y"); delay(150) ; //sound(1900) ; delay(80) ; //nosound() ; outtextxy(244,127,"T"); delay(150) ; //sound(1900) ; delay(80) ; //nosound() ; outtextxy(276,127,"E"); delay(150) ; //sound(1900) ; delay(80) ; //nosound() ; } else { outtextxy(150,281,"THE ANSWER IS WRONG"); delay(150) ; //sound(2500) ; delay(100) ; //nosound() ; } border1(5) ; return r ; } /******************************C*H*E*C*K**A*5********************************/ int checka5(char a5[],int r=0) { setcolor(6) ; char b1[5]="PEEL"; char b2[5]="peel"; if(strcmp(a5,b1)==0||strcmp(a5,b2)==0) { r++ ; outtextxy(66,154,"P"); delay(150) ; //sound(1900) ; delay(80) ; //nosound() ; outtextxy(94,154,"E"); delay(150) ; //sound(1900) ; delay(80) ; //nosound() ; outtextxy(131,154,"E"); delay(150) ; //sound(1900) ; delay(80) ; //nosound() ; outtextxy(169,154,"L"); delay(150) ; //sound(1900) ; delay(80) ; //nosound() ; } else { outtextxy(150,297,"THE ANSWER IS WRONG"); delay(150) ; //sound(2500) ; delay(100) ; //nosound() ; } border1(6) ; return r ; } /******************************C*H*E*C*K**A*6********************************/ int checka6(char a6[],int r=0) { setcolor(7) ; char b1[3]="OR"; char b2[3]="or"; if(strcmp(a6,b1)==0||strcmp(a6,b2)==0) { r++ ; outtextxy(244,154,"O"); delay(150) ; //sound(1900) ; delay(80) ; //nosound() ; outtextxy(276,154,"R"); delay(150) ; //sound(1900) ; delay(80) ; //nosound() ; } else { outtextxy(150,313,"THE ANSWER IS WRONG"); delay(150) ; //sound(2500) ; delay(100) ; //nosound() ; } border1(7) ; return r ; } /******************************C*H*E*C*K**A*7********************************/ int checka7(char a7[],int r=0) { setcolor(8) ; char b1[5]="SEEK"; char b2[5]="seek"; if(strcmp(a7,b1)==0||strcmp(a7,b2)==0) { r++ ; outtextxy(24,181,"S"); delay(150) ; //sound(1900) ; delay(80) ; //nosound() ; outtextxy(66,181,"E"); delay(150) ; //sound(1900) ; delay(80) ; //nosound() ; outtextxy(94,181,"E"); delay(150) ; //sound(1900) ; delay(80) ; //nosound() ; outtextxy(131,181,"K"); delay(150) ; //sound(1900) ; delay(80) ; //nosound() ; } else { outtextxy(150,329,"THE ANSWER IS WRONG"); delay(150) ; //sound(2500) ; delay(100) ; //nosound() ; } border1(8) ; return r ; } /******************************C*H*E*C*K**A*8********************************/ int checka8(char a8[],int r=0) { setcolor(9) ; char b1[4]="OWL"; char b2[4]="owl"; if(strcmp(a8,b1)==0||strcmp(a8,b2)==0) { r++ ; outtextxy(169,181,"O"); delay(150) ; //sound(1900) ; delay(80) ; //nosound() ; outtextxy(206,181,"W"); delay(150) ; //sound(1900) ; delay(80) ; //nosound() ; outtextxy(244,181,"L"); delay(150) ; //sound(1900) ; delay(80) ; //nosound() ; } else { outtextxy(150,345,"THE ANSWER IS WRONG"); delay(150) ; //sound(2500) ; delay(100) ; //nosound() ; } border1(9) ; return r ; } int checka9(char a9[],int r=0) { setcolor(10) ; char b1[5]="GNAW"; char b2[5]="gnaw"; if(strcmp(a9,b1)==0||strcmp(a9,b2)==0) { r++ ; outtextxy(66,208,"G"); delay(150) ; //sound(1900) ; delay(80) ; //nosound() ; outtextxy(94,208,"N"); delay(150) ; //sound(1900) ; delay(80) ; //nosound() ; outtextxy(131,208,"A"); delay(150) ; //sound(1900) ; delay(80) ; //nosound() ; outtextxy(169,208,"W"); delay(150) ; //sound(1900) ; delay(80) ; //nosound() ; } else { outtextxy(150,361,"THE ANSWER IS WRONG"); delay(150) ; //sound(2500) ; delay(100) ; //nosound() ; } border1(10) ; return r ; } int checka10(char a10[],int r=0) { setcolor(11) ; char b1[3]="DO"; char b2[3]="do"; if(strcmp(a10,b1)==0||strcmp(a10,b2)==0) { outtextxy(244,208,"D"); delay(150) ; //sound(1900) ; delay(80) ; //nosound() ; outtextxy(279,208,"O"); delay(150) ; //sound(1900) ; delay(80) ; //nosound() ; r++ ; } else { outtextxy(150,377,"THE ANSWER IS WRONG"); delay(150) ; //sound(2500) ; delay(100) ; //nosound() ; } border1(11) ; return r ; } int cluesd(int sum=0) { int r=0 ; char d1[10] ; char d2[10] ; char d3[10] ; char d4[10] ; char d5[10] ; char d6[10] ; char d7[10] ; char d8[10] ; char d9[10] ; char d10[10] ; char d11[10] ; char d12[10] ; outtextxy(312,18,"(1)MOUNTAINS SEPERATING U.S.S.R. AND EUROPE::") ; gotoxy(72,2); gets(d1) ; sum+=checkd1(d1,r); outtextxy(312,48,"(2)FRENCH 'THE'::") ; gotoxy(52,4); gets(d2) ; sum+=checkd2(d2,r); outtextxy(312,80,"(3)A BAKERS DOZEN::") ; gotoxy(55,6); gets(d3) ; sum+=checkd3(d3,r); outtextxy(312,112,"(4)HOTEL,MOTEL,REST HOUSE::") ; gotoxy(60,8); gets(d4) ; sum+=checkd4(d4,r); outtextxy(312,144,"(5)ANYBODY HOME IT'S ...::") ; gotoxy(58,10); sum+=checkd5(d5,r); outtextxy(312,176,"(6)MIXTURE OF METALS::") ; gotoxy(58,12); gets(d6) ; sum+=checkd6(d6,r); outtextxy(312,208,"(7)CHILDREN'S PLAY THING::") ; gotoxy(59,14); gets(d7) ; sum+=checkd7(d7,r); outtextxy(312,240,"(8)SAID IN PAST::"); gotoxy(54,16); gets(d8) ; sum+=checkd8(d8,r); outtextxy(312,272,"(9)FESTIVAL CELEBRATING SERRUCTION OF CHRIST::"); gotoxy(74,18); gets(d9) ; sum+=checkd9(d9,r); outtextxy(312,304,"(10)HOOK USED AS A HOLDER::"); gotoxy(60,20); gets(d10) ; sum+=checkd10(d10,r); outtextxy(312,336,"(11)A SHOCK::") ; gotoxy(51,22); gets(d11) ; sum+=checkd11(d11,r); outtextxy(312,368,"(12)OLD NAME FOR GALIUM::" ); gotoxy(58,24); gets(d12) ; sum+=checkd12(d12,r); return sum ; } int checkd1(char d1[],int r=0) { setcolor(12) ; char b1[6]="URALS"; char b2[6]="urals"; if(strcmp(d1,b1)==0||strcmp(d1,b2)==0) { r++ ; outtextxy(24,19,"U"); delay(150) ; //sound(1900) ; delay(80) ; //nosound() ; outtextxy(24,45,"R"); delay(150) ; //sound(1900) ; delay(80) ; //nosound() ; outtextxy(24,73,"A"); delay(150) ; //sound(1900) ; delay(80) ; //nosound() ; outtextxy(24,99,"L"); delay(150) ; //sound(1900) ; delay(80) ; //nosound() ; outtextxy(24,126,"S"); delay(150) ; //sound(1900) ; delay(80) ; //nosound() ; } else { outtextxy(412,28,"THE ANSWER IS WRONG"); delay(150) ; //sound(2500) ; delay(100) ; //nosound() ; } border1(13) ; return r ; } int checkd2(char d2[],int r=0) { setcolor(13) ; char b1[3]="LA"; char b2[3]="la"; if(strcmp(d2,b1)==0||strcmp(d2,b2)==0) { r++ ; outtextxy(62,19,"L"); delay(150) ; //sound(1900) ; delay(80) ; //nosound() ; outtextxy(62,45,"A"); delay(150) ; //sound(1900) ; delay(80) ; //nosound() ; } else { outtextxy(412,58,"THE ANSWER IS WRONG"); delay(150) ; //sound(3500) ; delay(100) ; //nosound() ; } border1(14) ; return r ; } int checkd3(char d3[],int r=0) { setcolor(14) ; char b1[9]="THIRTEEN"; char b2[9]="thirteen"; if(strcmp(d3,b1)==0||strcmp(d3,b2)==0) { r++ ; outtextxy(94,19,"T"); delay(150) ; //sound(1900) ; delay(80) ; //nosound() ; outtextxy(94,46,"H"); delay(150) ; //sound(1900) ; delay(80) ; //nosound() ; outtextxy(94,73,"I"); delay(150) ; //sound(1900) ; delay(80) ; //nosound() ; outtextxy(94,100,"R"); delay(150) ; //sound(1900) ; delay(80) ; //nosound() ; outtextxy(94,127,"T"); delay(150) ; //sound(1900) ; delay(80) ; //nosound() ; outtextxy(94,154,"E"); delay(150) ; //sound(1900) ; delay(80) ; //nosound() ; outtextxy(94,181,"E"); delay(150) ; //sound(1900) ; delay(80) ; //nosound() ; outtextxy(94,208,"N"); delay(150) ; //sound(1900) ; delay(80) ; //nosound() ; } else { outtextxy(412,90,"THE ANSWER IS WRONG"); delay(150) ; //sound(2500) ; delay(100) ; //nosound() ; } border1(15) ; return r ; } int checkd4(char d4[],int r=0) { setcolor(15) ; char b1[4]="INN"; char b2[4]="inn"; if(strcmp(d4,b1)==0||strcmp(d4,b2)==0) { r++ ; outtextxy(131,19,"I"); delay(150) ; //sound(1900) ; delay(80) ; //nosound() ; outtextxy(131,46,"N"); delay(150) ; //sound(1900) ; delay(80) ; //nosound() ; outtextxy(131,74,"N"); delay(150) ; //sound(1900) ; delay(80) ; //nosound() ; } else { outtextxy(412,122,"THE ANSWER IS WRONG"); delay(150) ; //sound(3500) ; delay(100) ; //nosound() ; } border1(1) ; return r ; } int checkd5(char d5[],int r=0) { setcolor(1) ; char b1[3]="ME"; char b2[3]="me"; if(strcmp(d5,b1)==0||strcmp(d5,b2)==0) { r++ ; outtextxy(169,19,"M"); delay(150) ; //sound(1900) ; delay(80) ; //nosound() ; outtextxy(169,46,"E"); delay(150) ; //sound(1900) ; delay(80) ; //nosound() ; } else { outtextxy(412,154,"THE ANSWER IS WRONG"); delay(150) ; //sound(2500) ; delay(100) ; //nosound() ; } border1(2) ; return r ; } int checkd6(char d6[],int r=0) { setcolor(2) ; char b1[6]="ALLOY"; char b2[6]="alloy"; if(strcmp(d6,b1)==0||strcmp(d6,b2)==0) { r++ ; outtextxy(206,19,"A"); delay(150) ; //sound(1900) ; delay(80) ; //nosound() ; outtextxy(206,46,"L"); delay(150) ; //sound(1900) ; delay(80) ; //nosound() ; outtextxy(206,73,"L"); delay(150) ; //sound(1900) ; delay(80) ; //nosound() ; outtextxy(206,100,"O"); delay(150) ; //sound(1900) ; delay(80) ; //nosound() ; outtextxy(206,127,"Y"); delay(150) ; //sound(1900) ; delay(80) ; //nosound() ; } else { outtextxy(412,186,"THE ANSWER IS WRONG"); delay(150) ; //sound(2500) ; delay(100) ; //nosound() ; } border1(3) ; return r ; } int checkd7(char d7[],int r=0) { setcolor(3) ; char b1[4]="TOY"; char b2[4]="toy"; if(strcmp(d7,b1)==0||strcmp(d7,b2)==0) { r++ ; outtextxy(244,19,"T"); delay(150) ; //sound(1900) ; delay(80) ; //nosound() ; outtextxy(244,46,"O"); delay(150) ; //sound(1900) ; delay(80) ; //nosound() ; outtextxy(244,73,"Y"); delay(150) ; //sound(1900) ; delay(80) ; //nosound() ; } else { outtextxy(412,218,"THE ANSWER IS WRONG"); delay(150) ; //sound(2500) ; delay(100) ; //nosound() ; } border1(4) ; return r ; } int checkd8(char d8[],int r=0) { setcolor(4) ; char b1[5]="TOLD"; char b2[5]="told"; if(strcmp(d8,b1)==0||strcmp(d8,b2)==0) { r++ ; outtextxy(244,127,"T"); delay(150) ; //sound(1900) ; delay(80) ; //nosound() ; outtextxy(244,154,"O"); delay(150) ; //sound(1900) ; delay(80) ; //nosound() ; outtextxy(244,181,"L"); delay(150) ; //sound(1900) ; delay(80) ; //nosound() ; outtextxy(244,208,"D"); delay(150) ; //sound(1900) ; delay(80) ; //nosound() ; } else { outtextxy(412,250,"THE ANSWER IS WRONG"); delay(150) ; //sound(2500) ; delay(100) ; //nosound() ; } border1(5) ; return r ; } int checkd9(char d9[],int r=0) { setcolor(5) ; char b1[7]="EASTER"; char b2[7]="easter"; if(strcmp(d9,b1)==0||strcmp(d9,b2)==0) { r++ ; outtextxy(276,19,"E"); delay(150) ; //sound(1900) ; delay(80) ; //nosound() ; outtextxy(276,46,"A"); delay(150) ; //sound(1900) ; delay(80) ; //nosound() ; outtextxy(276,73,"S"); delay(150) ; //sound(1900) ; delay(80) ; //nosound() ; outtextxy(276,100,"T"); delay(150) ; //sound(1900) ; delay(80) ; //nosound() ; outtextxy(276,127,"E"); delay(150) ; //sound(1900) ; delay(80) ; //nosound() ; outtextxy(276,154,"R"); delay(150) ; //sound(1900) ; delay(80) ; //nosound() ; } else { outtextxy(412,282,"THE ANSWER IS WRONG"); delay(150) ; //sound(2500) ; delay(100) ; //nosound() ; } border1(6) ; return r ; } int checkd10(char d10[],int r=0) { setcolor(6) ; char b1[4]="PEG"; char b2[4]="peg"; if(strcmp(d10,b1)==0||strcmp(d10,b2)==0) { r++ ; outtextxy(66,154,"P"); delay(150) ; //sound(1900) ; delay(80) ; //nosound() ; outtextxy(66,181,"E"); delay(150) ; //sound(1900) ; delay(80) ; //nosound() ; outtextxy(66,208,"G"); delay(150) ; //sound(1900) ; delay(80) ; //nosound() ; } else { outtextxy(412,314,"THE ANSWER IS WRONG"); delay(150) ; //sound(2500) ; delay(100) ; //nosound() ; } border1(7) ; return r ; } int checkd11(char d11[],int r=0) { setcolor(7) ; char b1[5]="BLOW"; char b2[5]="blow"; if(strcmp(d11,b1)==0||strcmp(d11,b2)==0) { r++ ; outtextxy(169,127,"B"); delay(150) ; //sound(1900) ; delay(80) ; //nosound() ; outtextxy(169,154,"L"); delay(150) ; //sound(1900) ; delay(80) ; //nosound() ; outtextxy(169,181,"O"); delay(150) ; //sound(1900) ; delay(80) ; //nosound() ; outtextxy(169,208,"W"); delay(150) ; //sound(1900) ; delay(80) ; //nosound() ; } else { outtextxy(412,346,"THE ANSWER IS WRONG"); delay(150) ; //sound(2500) ; delay(100) ; //nosound() ; } border1(8) ; return r ; } int checkd12(char d12[],int r=0) { setcolor(8) ; char b1[4]="EKA"; char b2[4]="eka"; if(strcmp(d12,b1)==0||strcmp(d12,b2)==0) { r++ ; outtextxy(131,154,"E"); delay(150) ; //sound(1900) ; delay(80) ; //nosound() ; outtextxy(131,181,"K"); delay(150) ; //sound(1900) ; delay(80) ; //nosound() ; outtextxy(131,208,"A"); delay(150) ; //sound(1900) ; delay(80) ; //nosound() ; } else { outtextxy(412,378,"THE ANSWER IS WRONG"); delay(150) ; //sound(2500) ; delay(100) ; //nosound() ; } border1(9) ; return r ; } void display() { cleardevice(); setcolor(LIGHTCYAN) ; settextstyle(TRIPLEX_FONT,HORIZ_DIR,4); rectangle(10,10,610,442) ; rectangle(12,12,608,440) ; int y=85 ; while(y<=535) { line(y,10,y,442) ; y=y+75; } y=64 ; while(y<=388) { line(10,y,610,y) ; y=y+54; } outtextxy(47,28,"U L T I M A T E"); outtextxy(47,190,"L O R D"); outtextxy(47,351,"S E E K"); outtextxy(114,297,"P E E L"); outtextxy(110,400,"G N A W"); outtextxy(330,243," B Y T E"); outtextxy(487,297," O R"); outtextxy(487,400,"D O"); outtextxy(47,80,"R A H N E L O A"); outtextxy(197,135,"I N"); outtextxy(197,243,"T"); outtextxy(47,134,"A"); outtextxy(422,135,"L Y S"); outtextxy(565,189,"T"); outtextxy(422,189,"O"); outtextxy(47,243,"S"); outtextxy(327,351," O W L"); settextstyle(TRIPLEX_FONT,HORIZ_DIR,1); outtextxy(12,11,"1"); outtextxy(87,11,"2"); outtextxy(162,11,"3"); outtextxy(237,11,"4"); outtextxy(312,11,"5"); outtextxy(387,11,"6"); outtextxy(462,11,"7"); outtextxy(462,227,"8"); outtextxy(537,11,"9"); outtextxy(87,282,"10"); outtextxy(312,228,"11"); outtextxy(237,282,"12"); settextstyle(TRIPLEX_FONT,HORIZ_DIR,1); outtextxy(12,42,"a"); outtextxy(162,152,"b"); outtextxy(12,206,"c"); outtextxy(312,260,"d"); outtextxy(87,314,"e"); outtextxy(462,314,"f"); outtextxy(12,364,"g"); outtextxy(312,368,"h"); outtextxy(87,420,"i"); outtextxy(462,420,"j"); outtextxy(237,314,"k"); int q=14 ; while(q<=85) { line(q,280,q,334) ; q++ ; } q=14 ; while(q<=85) { line(q,388,q,442) ; q++ ; } q=86 ; while(q<=160) { line(q,226,q,280) ; q++ ; } q=236 ; while(q<=311) { line(q,226,q,280) ; q++ ; } q=310 ; while(q<=385) { line(q,118,q,226) ; q++ ; } q=385 ; while(q<=460) { line(q,280,q,334) ; q++ ; } q=385 ; while(q<=460) { line(q,388,q,442) ; q++ ; } q=535 ; while(q<=610) { line(q,334,q,388) ; q++ ; } q=85 ; while(q<=160) { line(q,118,q,172) ; q++ ; } q=460 ; while(q<=535) { line(q,172,q,226) ; q++ ; } getch() ; } void over() { cleardevice(); settextstyle(TRIPLEX_FONT,HORIZ_DIR,2) ; setbkcolor(YELLOW) ; setcolor(RED) ; outtextxy(270,220," G A M E") ; setcolor(LIGHTMAGENTA) ; outtextxy(275,240," OVER") ; for(int i=48,j=0 ;i<=240,j<=15 ;i++,j++) { setcolor(j) ; circle(320,240,i) ; delay(50); if((j==15)&&(i<=240)) j=0 ; } delay(50); settextstyle(TRIPLEX_FONT,HORIZ_DIR,3) ; setcolor(RED) ; outtextxy(5,10,"G A M E") ; setcolor(MAGENTA) ; outtextxy(530,440,"G A M E") ; setcolor(BROWN) ; outtextxy(10,440,"O V E R") ; setcolor(CYAN) ; outtextxy(530,10,"O V E R") ; delay(400) ; cleardevice() ; sar() ; } void border() { rectangle(10,10,625,465) ; } void border1(int q) { if(q<=14) { setcolor(q) ; rectangle(8,8,627,467) ; setcolor(q+1) ; rectangle(10,10,625,465) ; } else { setcolor(0) ; rectangle(8,8,627,467) ; setcolor(1) ; rectangle(10,10,625,465) ; } } void halloffame() { cleardevice() ; ha.sort() ; myfile.open("ame.dat",ios::in|ios::binary) ; settextstyle(BOLD_FONT,HORIZ_DIR,3) ; outtextxy(100,0,"H A L L O F F A M E") ; int y=5; myfile.read((char *)&ha,sizeof(ha)) ; setcolor(YELLOW) ; rectangle(1,2,630,470) ; setcolor(RED) ; rectangle(1,47,630,2) ; setcolor(LIGHTBLUE) ; rectangle(1,49,54,470) ; setcolor(MAGENTA) ; rectangle(56,49,345,470) ; setcolor(CYAN) ; rectangle(347,49,630,470) ; settextstyle(TRIPLEX_FONT,HORIZ_DIR,2) ; outtextxy(79,50," N A M E") ; outtextxy(409,50,"S C O R E "); outtextxy(4,50,"S.No") ; while(myfile) { y=y+1 ; gotoxy(15,y); ha.show(y) ; myfile.read((char *)&ha,sizeof(ha)) ; } getch() ; myfile.close() ; } void nm() { cleardevice(); setlinestyle(DOTTED_LINE,1,1) ; setcolor(LIGHTRED) ; rectangle(8,8,627,467) ; setcolor(LIGHTBLUE) ; rectangle(10,10,625,465) ; setcolor(CYAN) ; rectangle(12,12,623,463) ; setcolor(LIGHTGREEN) ; rectangle(14,14,621,461) ; setcolor(BROWN) ; rectangle(16,16,619,459) ; setcolor(LIGHTBLUE) ; rectangle(18,18,617,457) ; setlinestyle(SOLID_LINE,1,3) ; setcolor(CYAN) ; rectangle(155,212,550,250) ; setlinestyle(DASHED_LINE,1,2) ; setcolor(YELLOW) ; rectangle(400,217,547,245) ; setlinestyle(SOLID_LINE,1,1) ; myfile.open("fame.dat",ios::ate|ios::binary) ; myfile.write((char *)&ha,sizeof(ha)) ; settextstyle(SMALL_FONT,HORIZ_DIR,8); setcolor(LIGHTGREEN) ; int a=1 ; while(a==1) { ha.nme() ; a++ ; myfile.write((char *)&ha,sizeof(ha)) ; } setcolor(WHITE) ; myfile.close() ; } void hall::nme() { outtextxy(160,212,"Enter Your Name::") ; gotoxy(52,15) ; gets(name); } void hall::show(int y) { int l=strlen(name) ; for(int i=0 ; i<=l ; i++) name[i]=toupper(name[i]) ; gotoxy(3,y) ; cout<=0) { rectangle(160,190,550,250) ; setfillstyle(SOLID_FILL,RED) ; floodfill(2,2,RED) ; setcolor(BLUE) ; outtextxy(170,203,"Your Score In The Crossword Was...... /22") ; gotoxy(64,14) ; cout<>sco ; if(sco!=w) { outtextxy(100,300,"L I A R Y o u r S c o r e I s") ; cout<