Web Hattı - Türkiyenin En Güncel Forumu

yılan oyunu'un kodları

Yazılım kategorisinde ve Web Tasarım ve Hazır Kodlar forumunda bulunan yılan oyunu'un kodları konusunu görüntülemektesiniz.kod : # include <stdio.h> # include <conio.h> # include <dos.h> # include <string.h> # include <stdlib.h> int yilan[100][2]; int ...



Geri git   Web Hattı - Türkiyenin En Güncel Forumu > Yazılım > Web Tasarım ve Hazır Kodlar

Maşaallah yılan oyunu'un kodları

İndir Sitemap Arama Haritası Harita Kayıt ol Forumları Okundu Kabul Et


yılan oyunu'un kodları


Yeni Konu aç  Cevapla

 

LinkBack Seçenekler
Alt 03-26-2006, 06:16 PM  
Red face


kod :

# include <stdio.h>
# include <conio.h>
# include <dos.h>
# include <string.h>
# include <stdlib.h>

int yilan[100][2];
int yemx,yemy,yb;
int tus;
int i,j;
int puan,hiz,toppuan;
int secim;
int durum=0;

acilis()
{
clrscr();
textcolor(4);
gotoxy(23,5); cprintf("Ú");
gotoxy(51,5); cprintf("¿");
gotoxy(23,16); cprintf("À");
gotoxy(51,16); cprintf("Ù");

textcolor(10); gotoxy(26,8); cprintf("[1] Yavas Puan(5)");
textcolor(10); gotoxy(26,9); cprintf("[2] Normal Puan(10)");
textcolor(10); gotoxy(26,10); cprintf("[3] Hizli Puan(15)");
textcolor(10); gotoxy(26,11); cprintf("[4] Cok Hizli Puan(20)");
textcolor(10); gotoxy(26,12); cprintf("[5] Cikis");
textcolor(2); gotoxy(26,14); cprintf("Seciminiz...: ");
textcolor(7);
secim=getch();
switch(secim)
{
case '1': puan=5; hiz=200; break;
case '2': puan=10; hiz=150; break;
case '3': puan=15; hiz=100; break;
case '4': puan=20; hiz=50; break;
case '5': return 0; break;
default : puan=5; hiz=200; break;
}

clrscr();
textcolor(9); gotoxy(30,1); cprintf("441 EMRAH SIMSEK YILAN OYUNU");
textcolor(4);
gotoxy(5,2); cprintf("Ú");
gotoxy(75,2); cprintf("¿");
gotoxy(5,22); cprintf("À");
gotoxy(75,22); cprintf("Ù");
textcolor(7);
for (i=6;i<=74;i++)
{
gotoxy(i,2); cprintf("Ä");
gotoxy(i,22); cprintf("Ä");
}
for (i=3;i<=21;i++)
{
gotoxy(5,i);cprintf("³");
gotoxy(75,i);cprintf("³");
}
yb=3;
yilan[0][0]=10;
yilan[1][0]=9;
yilan[2][0]=8;

yilan[0][1]=10;
yilan[1][1]=10;
yilan[2][1]=10;

randomize();
yemx=(rand()%50)+5;
yemy=(rand()%10)+5;

textcolor(7);
for (i=0;i<yb;i++)
{
gotoxy(yilan[i][0],yilan[i][1]); cprintf("");
}
textcolor(2); gotoxy(yemx,yemy); cprintf("*");
gotoxy(yilan[yb-1][0],yilan[yb-1][1]); printf(" ");
}

yem()
{
randomize();
j=0;
while(j==0)
{
yemx=(rand()%67)+6;
yemy=(rand()%17)+3;
for (i=0;i<yb;i++)
{
if (yemx!=yilan[i][0] && yemy!=yilan[i][1])
j=1;
textcolor(2); gotoxy(yemx,yemy); cprintf("*");
}
}
}


yilanciz()
{
textcolor(7);
for (i=0;i<yb;i++)
{
gotoxy(yilan[i][0],yilan[i][1]); printf("");
}
gotoxy((yilan[yb-1][0]),(yilan[yb-1][1])); printf(" ");

if (yilan[0][0]==yemx && yilan[0][1]==yemy)
{
yb=yb+1;
toppuan=toppuan+puan;
gotoxy(30,24); printf("PUAN...: %d ",toppuan);
gotoxy((yilan[yb-1][0]),(yilan[yb-1][1])); printf("");
gotoxy(30,24); printf("PUAN...: %d ",toppuan);
yem();
}
if (yilan[0][1]==2 || yilan[0][1]==22 || yilan[0][0]==5 || yilan[0][0]==75)
{
gotoxy(30,25); printf("Oyun Bitti!"); durum=1;
return 0;
}

for (i=1;i<yb;i++)
{
if(yilan[0][0]==yilan[i][0] && yilan[0][1]==yilan[i][1])
{
gotoxy(30,25); printf("Oyun Bitti!"); durum =1; return 0;
}
}
}


main()
{
acilis();
tus=getch();
while(tus!=27)
{
while(!kbhit() && durum==0)
{
if(tus==77) //sag
{
for (i=yb-1;i>0;i--)
{
yilan[i][0]=yilan[i-1][0];
yilan[i][1]=yilan[i-1][1];
}
yilan[0][0]=yilan[0][0]+1;
yilanciz();
}

if (tus==80) //asagi
{
for (i=yb-1;i>0;i--)
{
yilan[i][0]=yilan[i-1][0];
yilan[i][1]=yilan[i-1][1];
}
yilan[0][1]=yilan[0][1]+1;
yilanciz();
}

if (tus==72) //yukari
{
for (i=yb-1;i>0;i--)
{
yilan[i][0]=yilan[i-1][0];
yilan[i][1]=yilan[i-1][1];
}
yilan[0][1]=yilan[0][1]-1;
yilanciz();
}

if (tus==75) //sol
{
for (i=yb-1;i>0;i--)
{
yilan[i][0]=yilan[i-1][0];
yilan[i][1]=yilan[i-1][1];
}
yilan[0][0]=yilan[0][0]-1;
yilanciz();
}
if (durum==1)
{
getch();
return 0;
}
delay(hiz);
}
tus=getch();
}

getch();
}

______________________________ ____________________ __


C ile yılan oyunu


" C dili ile yılan oyunu ..."


kod :

# include <stdio.h>
# include <conio.h>
# include <dos.h>
# include <string.h>
# include <stdlib.h>

int yilan[100][2];
int yemx,yemy,yb;
int tus;
int i,j;
int puan,hiz,toppuan;
int secim;
int durum=0;

acilis()
{
clrscr();
textcolor(4);
gotoxy(23,5); cprintf("Ú");
gotoxy(51,5); cprintf("¿");
gotoxy(23,16); cprintf("À");
gotoxy(51,16); cprintf("Ù");

textcolor(10); gotoxy(26,8); cprintf("[1] Yavas Puan(5)");
textcolor(10); gotoxy(26,9); cprintf("[2] Normal Puan(10)");
textcolor(10); gotoxy(26,10); cprintf("[3] Hizli Puan(15)");
textcolor(10); gotoxy(26,11); cprintf("[4] Cok Hizli Puan(20)");
textcolor(10); gotoxy(26,12); cprintf("[5] Cikis");
textcolor(2); gotoxy(26,14); cprintf("Seciminiz...: ");
textcolor(7);
secim=getch();
switch(secim)
{
case '1': puan=5; hiz=200; break;
case '2': puan=10; hiz=150; break;
case '3': puan=15; hiz=100; break;
case '4': puan=20; hiz=50; break;
case '5': return 0; break;
default : puan=5; hiz=200; break;
}

clrscr();
textcolor(9); gotoxy(30,1); cprintf("441 EMRAH SIMSEK YILAN OYUNU");
textcolor(4);
gotoxy(5,2); cprintf("Ú");
gotoxy(75,2); cprintf("¿");
gotoxy(5,22); cprintf("À");
gotoxy(75,22); cprintf("Ù");
textcolor(7);
for (i=6;i<=74;i++)
{
gotoxy(i,2); cprintf("Ä");
gotoxy(i,22); cprintf("Ä");
}
for (i=3;i<=21;i++)
{
gotoxy(5,i);cprintf("³");
gotoxy(75,i);cprintf("³");
}
yb=3;
yilan[0][0]=10;
yilan[1][0]=9;
yilan[2][0]=8;

yilan[0][1]=10;
yilan[1][1]=10;
yilan[2][1]=10;

randomize();
yemx=(rand()%50)+5;
yemy=(rand()%10)+5;

textcolor(7);
for (i=0;i<yb;i++)
{
gotoxy(yilan[i][0],yilan[i][1]); cprintf("");
}
textcolor(2); gotoxy(yemx,yemy); cprintf("*");
gotoxy(yilan[yb-1][0],yilan[yb-1][1]); printf(" ");
}

yem()
{
randomize();
j=0;
while(j==0)
{
yemx=(rand()%67)+6;
yemy=(rand()%17)+3;
for (i=0;i<yb;i++)
{
if (yemx!=yilan[i][0] && yemy!=yilan[i][1])
j=1;
textcolor(2); gotoxy(yemx,yemy); cprintf("*");
}
}
}


yilanciz()
{
textcolor(7);
for (i=0;i<yb;i++)
{
gotoxy(yilan[i][0],yilan[i][1]); printf("");
}
gotoxy((yilan[yb-1][0]),(yilan[yb-1][1])); printf(" ");

if (yilan[0][0]==yemx && yilan[0][1]==yemy)
{
yb=yb+1;
toppuan=toppuan+puan;
gotoxy(30,24); printf("PUAN...: %d ",toppuan);
gotoxy((yilan[yb-1][0]),(yilan[yb-1][1])); printf("");
gotoxy(30,24); printf("PUAN...: %d ",toppuan);
yem();
}
if (yilan[0][1]==2 || yilan[0][1]==22 || yilan[0][0]==5 || yilan[0][0]==75)
{
gotoxy(30,25); printf("Oyun Bitti!"); durum=1;
return 0;
}

for (i=1;i<yb;i++)
{
if(yilan[0][0]==yilan[i][0] && yilan[0][1]==yilan[i][1])
{
gotoxy(30,25); printf("Oyun Bitti!"); durum =1; return 0;
}
}
}


main()
{
acilis();
tus=getch();
while(tus!=27)
{
while(!kbhit() && durum==0)
{
if(tus==77) //sag
{
for (i=yb-1;i>0;i--)
{
yilan[i][0]=yilan[i-1][0];
yilan[i][1]=yilan[i-1][1];
}
yilan[0][0]=yilan[0][0]+1;
yilanciz();
}

if (tus==80) //asagi
{
for (i=yb-1;i>0;i--)
{
yilan[i][0]=yilan[i-1][0];
yilan[i][1]=yilan[i-1][1];
}
yilan[0][1]=yilan[0][1]+1;
yilanciz();
}

if (tus==72) //yukari
{
for (i=yb-1;i>0;i--)
{
yilan[i][0]=yilan[i-1][0];
yilan[i][1]=yilan[i-1][1];
}
yilan[0][1]=yilan[0][1]-1;
yilanciz();
}

if (tus==75) //sol
{
for (i=yb-1;i>0;i--)
{
yilan[i][0]=yilan[i-1][0];
yilan[i][1]=yilan[i-1][1];
}
yilan[0][0]=yilan[0][0]-1;
yilanciz();
}
if (durum==1)
{
getch();
return 0;
}
delay(hiz);
}
tus=getch();
}

getch();
}

 
Alt 03-26-2006, 06:41 PM  
Standart

lem bu "C"de bak ben biliom ; bunu


saol

 
Alt 03-27-2006, 03:21 PM  
Standart

 
Alt 05-02-2006, 04:26 PM  
Standart

 
Alt 05-02-2006, 05:00 PM  
Standart

lan olum nasıl kullancaz efe sen bilirsin ne kullancaz
 
Alt 05-31-2006, 12:21 PM  
Standart

güzel bi yenilik oldu sagol
 
Alt 03-13-2007, 06:25 PM  
Standart Ce: yılan oyunu'un kodları

Sağol kardeş.
 
Alt 04-21-2007, 02:50 PM  
Standart Ce: yılan oyunu'un kodları

İyi güzel de kod bayabir uzunmuş yaw. Bu arada paylaştığın için sağol.
 
Alt 06-27-2007, 09:05 PM  
Standart Ce: yılan oyunu'un kodları

saolllll
 
Cevapla

Etiketler: , , ,


Seçenekler

yılan oyunu'un kodları

Yazılım kategorisinde ve Web Tasarım ve Hazır Kodlar forumunda bulunan yılan oyunu'un kodları konusunu görüntülemektesiniz.kod : # include <stdio.h> # include <conio.h> # include <dos.h> # include <string.h> # include <stdlib.h> int yilan[100][2]; int ...


yılan oyunu'un kodları konusuna benzer konular:

Konu Konuyu Başlatan Forum Cevaplar Son Mesaj
Yılan nerden gecıyo acaba??? ReAlWaN Genel Sohbet 45 07-25-2007 10:02 PM
yılan $emre$ Komik Şeyler 8 07-16-2007 06:04 PM
Manisa'da 68 kiloluk dev yılan! Shady08 WH Haber Bülteni 2 04-23-2007 12:16 PM
iki başlı yılan.hiç gördünüzmü.işte seyredin baba_uğur Genel Sohbet 12 03-29-2007 01:35 AM


Bütün Zaman Ayarları WEZ +2 olarak düzenlenmiştir. Şu Anki Saat: 05:46 PM .





Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 ©2008, Crawlability, Inc.
Forums Directory
We Hattı RSS Besleme Alexa Toolbar

Benzer Forumlar: izafet | UslanmaM | TEKplatform | MaxiCep.Com | iDo-FoRuM | Main-Board | Bedava İndir