Programming Languages Welcome to coding world Snake Game code in C #include <graphics.h> #include <stdio.h> #include <stdlib.h> #define T 2000 int n=0,px,py; main() { int gd=DETECT,gm,i,j; clrscr(); gotoxy(25,4); printf("DON'T TUCH THE BORDER"); gotoxy(25,6); printf("Press < p > for pause"); gotoxy(17,8); printf("IN MIDDLE OF GAME, PRESS < Esc > TO EXIT"); x: gotoxy(26,10); printf("press < s > to start "); gotoxy(26,12); printf(" Use SMALL case only"); gotoxy(34,10); if(getch()=='s') initgraph(&gd,&gm,"c:\tc\bgi"); else { clrscr(); goto x; } line(0,0,0,479); line(0,0,639,0); line(639,0,639,479); line(0,479,639,479); pause(); print(); right(100,100); } right(int x,int y) { char ch,fu='r'; int i,j; for(i=x;i<=652;i++){
My blog honor to help readers at all stages of their journey make progress towards new level of success. Come and learn from my blog about what you need what you want to know just follow my blog. Follow my blog to update with currents affairs of Pakistan. My blog although updates you about the showbiz of Pakistan.