BARONER FORUM
Would you like to react to this message? Create an account in a few clicks or log in to continue.

BARONER FORUM

Bahadır Arda Onur Eren
 
AnasayfaGaleriLatest imagesAramaKayıt OlGiriş yap

 

 KOVALAMACA OYUNU

Aşağa gitmek 
YazarMesaj
ONUR
Admin
ONUR


Mesaj Sayısı : 52
Kayıt tarihi : 25/11/08

KOVALAMACA OYUNU Empty
MesajKonu: KOVALAMACA OYUNU   KOVALAMACA OYUNU Icon_minitimeC.tesi Ocak 10, 2009 2:08 pm

KOVALAMACA OYUNU

Uses crt;
Var
fr,scor,o,z,ux,uy,x,y:Integer;
ch,tus:Char;
a:Boolean;
az:array[1..5] of boolean;

Procedure yon(ch:char);
Begin
fr:=0;
case ch of
#77:If x<80 then inc(x);
#80:If y<25 then inc(y);
#75:if x>1 then dec(x);
#72:If y>1 then dec(y);
end;
gotoxy(40,13);write('Sizin koordinantlariniz:',x,' ',y);
gotoxy(40,14);write('Ulduzun koordinantlari :',ux,' ',uy);
gotoxy(40,15);write('Scor :',scor);
gotoxy(x,y);
inc(fr);
End;




Begin
clrscr;
gotoxy(15,15);write('*');o:=0;scor:=0;
x:=1;y:=1;ux:=15;uy:=15;
gotoxy(x,y);

randomize;
Repeat
tus:=readkey;
clrscr;
gotoxy(x,y);write(#1);
If tus=#0 then tus:=readkey;
yon(tus);
If (x=ux) and (y=uy) then begin inc(o);scor:=scor+100;az[o]:=true; end;
If o=3 then break;
z:=random(5);
delay(200);
case z of
1:inc(uy);
2:dec(uy);
3:inc(ux);
4:dec(ux);
end;
gotoxy(ux,uy);
write('*');If fr=100 then a:=false;
Until tus=#27;

If (az[1]=true) and (az[2]=true) and (az[3]=true) then begin clrscr;write('S I Z U D D U N U Z ! ! !');readln; end;
If a=false then begin clrscr;write('S I Z U D U Z D U N U Z ! ! !');end;
end.


ALINTI:http://www.programlama.com/sys/c2html/view.php?DocID=6684
Sayfa başına dön Aşağa gitmek
 
KOVALAMACA OYUNU
Sayfa başına dön 
1 sayfadaki 1 sayfası

Bu forumun müsaadesi var:Bu forumdaki mesajlara cevap veremezsiniz
BARONER FORUM :: PROGRAMLAMA :: TURBO PASCALL-
Buraya geçin: