EDB-Coding/Snake — Issue #1: Code_main
Author: EDB-Coding
Created: 2011-12-19 19:09:06+00:00
State: open

#include
#include

#include

using namespace std;

void anfangswertesetzen(int sx[50],int sy[50],int &anzahl, int &eix, int &eiy)
{
sx[0]=300;
sy[0]=160;

sx[1]=310;
sy[1]=160;

sx[2]=320;
sy[2]=160;

anzahl=3;

srand (time(0));
eix=500;
eiy=320;

}//end main anfangswertesetzen

void draw_egg(int eix, int eiy)
{
setcolor(WHITE); //Farbe des Ei's
circle(eix,eiy, 5);

}//end draw_egg

void draw_snake(int sx[200], int sy[200], int anzahl)
{int i=0;

setcolor(LIGHTGREEN);

for(i=0;i=636)
{
setcolor(LIGHTRED);
bgiout<<"GAMEOVER";
outstreamxy(320,0);

taste='q';
}//end if

if(sy[0]>=476)
{
setcolor(LIGHTRED);

bgiout<<"GAMEOVER";
outstreamxy(320,0);

taste='q';
}//end if

for(z=1;z