#include<graphics.h>#include<stdlib.h>#include<stdio.h>#include<conio.h>#include<dos.h>#include<string.h>void score(int i){setcolor(10);settextstyle(2,0,1);outtextxy(25+i+5,(getmaxy())-25,"*");}void erase(int x){setcolor(9);settextstyle(2,0,1);outtextxy(25+x+5,(getmaxy())-25,"*");}void main(){/* select a driver and mode that supports *//* multiple background colors. */int gdriver = EGA, gmode = EGAHI, errorcode;int poly1[20],poly2[20],i,j,k,m=0,n=225,x,y,z,p;int poly[20],a=0,b,s=0;char ch,ans='y',msg[80];/* initialize graphics and local variables */initgraph(&gdriver, &gmode, "");/* read result of initialization */errorcode = graphresult();if (errorcode != grOk) /* an error occurred */{printf("Graphics error: %s\n", grapherrormsg(errorcode));printf("Press any key to halt:");getch();exit(1); /* terminate with an error code */}/* for centering text messages */settextjustify(CENTER_TEXT, CENTER_TEXT);x = getmaxx();// / 2;y = getmaxy();// / 2;setbkcolor(9);getch();/*score board*/setcolor(12);rectangle(5,y-55,105,y-5);rectangle(8,y-52,102,y-8);settextstyle(1,0,1);outtextxy(55,y-45,"SCORE");/*name*/settextstyle(2,0,4);outtextxy(x/2,y-10,"BY ARUN PRASANTH.B I-year ECE");
Leave a Comment