int update(int& update_x, int& update_y, int update_xspeed, int update_yspeed)
{
update_x= update_x+update_xspeed;
update_y= update_y+update_yspeed;
}
int show(int show_x, int show_y)
{
bar(show_x,show_y,10,10);
while(!kbhit()) delay(1);
int snake()
{
int x = 0; int y = 0; int xspeed = 1; int yspeed = 0;
update(x, y, xspeed, yspeed);
show(x, y);
}
Comments
0 B
|👍
/👎