Da_Gamer icon

snake example 1

Da_Gamer | PRO | 12/17/16 08:35:39 PM UTC | 0 ⭐ | 298 👁️ | Never ⏰ | []
C++ |

370 B

|

None

|

0 👍

/

0 👎

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

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎