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(&quot;c:\tc\bin\rattle.txt&quot;) infile.getline(hs,4) infile.close() hscore = atoi(hs) /* initialize graphics and local variables */ initgraph(&amp;gdriver, &amp;gmode, &quot;c:\tc\bgi&quot;) /* read result of initialization */ errorcode = graphresult() if (errorcode != grOk) /* an error occurred */ { printf(&quot;Graphics error: %s...
View Full Document

This note was uploaded on 11/06/2010 for the course UBIT 411 taught by Professor Saleemelahi during the Spring '10 term at University of Karachi.

Ask a homework question - tutors are online