{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

battle snake - int k=2,l,r1,r2,f=0,z=100,first=0,second=1...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Sheet1 Page 1 #include <graphics.h> #include <stdlib.h> #include <stdio.h> #include <conio.h> #include <dos.h> #include <iostream.h> #include <fstream.h> #include <string.h> void main(void) { int gdriver = DETECT, gmode, errorcode void *body,*food,*tail1,*tail2,*tail3,*tail4,*head1,*head2,*head3,*head4 int x, y,X[5000],Y[5000],i=3, maxx,maxy,speed=100,bo=10,t[10],score=0,hscore=20 unsigned int size char a='6',b,scor[4],hs[4]
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: int k=2,l,r1,r2,f=0,z=100,first=0,second=1 r1=300 r2=350 ifstream infile("c:\tc\bin\rattle.txt") infile.getline(hs,4) infile.close() hscore = atoi(hs) /* initialize graphics and local variables */ initgraph(&gdriver, &gmode, "c:\tc\bgi") /* read result of initialization */ errorcode = graphresult() if (errorcode != grOk) /* an error occurred */ { printf("Graphics error: %s...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online