computer graphics program in c for golf game

March 22, 2011 at 06:38:31
Specs: Windows XP
pls help

See More: computer graphics program in c for golf game

Report •


#1
March 22, 2011 at 08:09:48
What's the problem?

Report •

#2
March 23, 2011 at 00:31:37
i have got an assignment on submission of computer graphics program for golf game.. i hv tried alot i am totally confused

Report •

#3
March 23, 2011 at 00:50:40
It wouldn't be very fair if I did your assignment for you, would it. Talk to your tutor.

Report •

Related Solutions

#4
April 3, 2011 at 09:13:40
thank u so much for encouraging me to do the program otherwise i wouldn't have got the idea of doing the golf game...now i have created the program can you help me by doing some modifications.......
#include<stdio.h>
#include<conio.h>
#include<graphics.h>
void main()
{
int gdriver=DETECT,gmde,i;
float k,j,a,b,p,q;
clrscr();
initgraph(&gdriver,&gmde,"c:\\tc\\bgi");
setcolor(BLUE);
circle(500,403,10);
setcolor(YELLOW);
circle(60,350,8);
line(60,358,45,378);
line(45,378,45,400);
line(45,400,48,403);
line(60,358,65,378);
setcolor(GREEN);
line(65,378,80,403);
setcolor(RED);
circle(81,402,2);
circle(500,403,10);
for(i=1;i<=4;i++)
{
setcolor(BLUE);
circle(500,403,10);
delay(600);
cleardevice();
setcolor(BLUE);
circle(500,403,10);
setcolor(YELLOW);
circle(60,350,8);
line(60,358,45,378);
line(45,378,45,400);
line(45,400,48,403);
line(60,358,65,378);
setcolor(GREEN);
{
line(65,378,80+k,403-j);
}
setcolor(RED);
circle(81+k,402-j,2);
k=k+3;
j=j+5;
}

for(i=1;i<=10;i++)
{
setcolor(BLUE);
circle(500,403,10);
delay(700);
cleardevice();
circle(500,403,10);
setcolor(RED);
circle(81+k,402-j,2);
k=k+6;
j=j+10;
setcolor(YELLOW);
circle(60,350,8);
line(60,358,45,378);
line(45,378,45,400);
line(45,400,48,403);
line(60,358,65,378);
setcolor(GREEN);
line(65,378,80,403);
setcolor(BLUE);
circle(500,403,10);
}

for(i=1;i<=10;i++)
{
delay(700);
cleardevice();
setcolor(BLUE);
circle(500,403,10);
setcolor(RED);
circle(81+k,402-j,2);
k=k+6;
j=j-13;
setcolor(YELLOW);
circle(60,350,8);
line(60,358,45,378);
line(45,378,45,400);
line(45,400,48,403);
line(60,358,65,378);
setcolor(GREEN);
line(65,378,80,403);
setcolor(BLUE);
circle(500,403,10);
}

for(i=0;i<10;i++)
{
delay(1000);
cleardevice();
setcolor(BLUE);
circle(500,403,10);
setcolor(YELLOW);
circle(60+i,350,8);
line(60+i,358,60+i,380);
if(i%2==0)
{
line(60+i,380,55+i,400);
line(60+i,380,65+i,400);
}
else
{
line(60+i,380,70+i,400);
line(60+i,380,75+i,400);
}
line(60+i,358,82+i,370);
line(60+i,358,80+i,365);
setcolor(GREEN);
line(82+i,370,90+i,400);
}
for(i=1;i<=4;i++)
{
delay(700);
cleardevice();
setcolor(BLUE);
circle(500,403,10);
setcolor(YELLOW);
circle(200,350,8);
line(200,358,185,378);
line(185,378,185,400);
line(185,400,188,403);
line(200,358,205,378);
setcolor(GREEN);
line(205,378,220+a,403-b);
setcolor(RED);
circle(222+a,402-b,2);
a=a+3;
b=b+5;
}
setcolor(BLUE);
circle(500,403,10);
setcolor(YELLOW);
circle(200,350,8);
line(200,358,185,378);
line(185,378,185,400);
line(185,400,188,403);
line(200,358,205,378);
setcolor(BLUE);
circle(500,403,10);
for(i=1;i<=10;i++)
{
delay(700);
cleardevice();
setcolor(BLUE);
circle(500,403,10);
setcolor(RED);
circle(222+a,402-b,2);
a=a+6;
b=b+10;
setcolor(YELLOW);
circle(200,350,8);
line(200,358,185,378);
line(185,378,185,400);
line(185,400,188,403);
line(200,358,205,378);
setcolor(GREEN);
line(205,378,220,403);
setcolor(BLUE);
circle(500,403,10);
}
for(i=1;i<=10;i++)
{
delay(700);
cleardevice();
setcolor(BLUE);
circle(500,403,10);
setcolor(RED);
circle(222+a,402-b,2);
a=a+6;
b=b-13;
setcolor(YELLOW);
circle(200,350,8);
line(200,358,185,378);
line(185,378,185,400);
line(185,400,188,403);
line(200,358,205,378);
setcolor(GREEN);
line(205,378,220,403);
}
for(i=0;i<10;i++)
{
delay(1000);
cleardevice();
setcolor(BLUE);
circle(500,403,10);
setcolor(YELLOW);
circle(200+i,350,8);
line(200+i,358,200+i,380);
if(i%2==0)
{
line(200+i,380,195+i,400);
line(200+i,380,205+i,400);
}
else
{
line(200+i,380,210+i,400);
line(200+i,358,220+i,365);

}
line(200+i,358,222+i,370);
line(200+i,358,220+i,365);
setcolor(GREEN);
line(222+i,370,230+i,400);
}

for(i=1;i<=4;i++)
{
delay(700);
cleardevice();
setcolor(BLUE);
circle(500,403,10);
setcolor(YELLOW);
circle(350,350,8);
line(350,358,335,378);
line(335,378,335,400);
line(335,400,338,403);
line(350,358,355,378);
setcolor(GREEN);
line(355,378,370+p,403-q);
setcolor(RED);
circle(372+p,403-q,2);
p=p+3;
q=q+5;
}
setcolor(BLUE);
circle(500,403,10);
setcolor(YELLOW);
circle(350,350,8);
line(350,358,335,378);
line(335,378,335,400);
line(335,400,338,403);
line(350,358,355,378);
setcolor(GREEN);
setcolor(RED);
for(i=1;i<=10;i++)
{
delay(700);
cleardevice();
setcolor(BLUE);
circle(500,403,10);
setcolor(RED);
circle(372+p,403-q,2);
p=p+6;
q=q+10;
setcolor(YELLOW);
circle(350,350,8);
line(350,358,335,378);
line(335,378,335,400);
line(335,400,338,403);
line(350,358,355,378);
setcolor(GREEN);
line(355,378,370,403);
}
setcolor(BLUE);
circle(500,403,10);

for(i=1;i<=10;i++)
{
delay(700);
cleardevice();
setcolor(BLUE);
circle(500,403,10);
setcolor(RED);
circle(372+p,403-q,2);
p=p+6;
q=q-13;
setcolor(YELLOW);
circle(350,350,8);
line(350,358,335,378);
line(335,378,335,400);
line(335,400,338,403);
line(350,358,355,378);
setcolor(GREEN);
line(355,378,370,403);
setcolor(BLUE);
circle(500,403,10);
}
getch();
}


Report •

Ask Question