uses crt,araclar,dos;
izafet.Com - pascalda yarış oyunu var
cy,by:array [1..3] of byte;
d:array [1..5] of boolean;
bard1,bard2:boolean;
s,arx,barx1,bary1,barx2,bary2,hak:byte;
hz,g:longint;
tus:char;
regs:registers;
skor:longint;
procedure kursoryok;
begin
regs.ch:=$1F;
regs.cl:=$0;
regs.ah:=$1;
regs.al:=$0;
intr($10,regs);
end;
procedure b_araba(x1,y1,r:byte);
begin
if (y1>=1) and (y1<24) then
begin
renk(r,7);
gotoxy(x1,y1);write(chr(16));
kutu(x1+1,y1,x1+3,y1,r);
gotoxy(x1+4,y1);write(chr(17));
end;
if (y1>=2) and (y1<25) then
begin
gotoxy(x1,y1-1);write(' ');
kutu(x1+1,y1-1,x1+3,y1-1,r);
gotoxy(x1+4,y1-1);write(' ');
end;
if (y1>3) and (y1<26) then
begin
gotoxy(x1+4,y1-3);write(chr(17));
kutu(x1+1,y1-3,x1+3,y1-3,r);
gotoxy(x1,y1-3);write(chr(16));
end;
if (y1>=4) and (y1<29) then kutu(x1,y1-4,x1+4,y1-4,7);
end;
procedure araba(x1,y1,r:byte);
begin
renk(r,7);
gotoxy(x1,y1-1);Write(' ');
gotoxy(x1,y1+2);write(chr(16));
gotoxy(x1+5,y1+2);write(chr(17));
gotoxy(x1,y1);write(chr(16));
gotoxy(x1+5,y1);write(chr(17));
kutu(x1+1,y1,x1+4,y1+2,r);
renk(15,1);
gotoxy(x1+2,y1);Write(chr(254));
gotoxy(x1+3,y1);write(chr(254));
end;
procedure oyun;
begin
clrscr;
textmode(4);
renk(15,15);
ekran(1457);
for s:=1 to 5 do
d:=false;
for s:=1 to 3 do
begin
cy:=1;
by:=1;
end;
arx:=15; hz:=10000; g:=100; bary1:=1; s:=1;
barx1:=15; bary2:=1; barx2:=8; hak:=3; skor:=0;
kutu(15,1,65,25,1);
kutu(16,2,50,24,6);
kutu(20,2,46,24,7);
kutu(52,15,64,15,3);
window(16,2,65,24);
repeat
if hz=1 then skor:=skor+3;
if hz>5 then skor:=skor+1;
kursoryok;
randomize;
if (bary1>19) and (bary1<23) and (barx1+3>arx) and (barx1+3<arx+5) then
begin
readkey;
if hak<>1 then hak:=hak-1
else
begin
renk(40,7);
gotoxy(13,11);write('......Game Bitti......');
gotoxy(15,12);write(skor,' Puan Aldiniz...');
readkey;
break;
end;
end;
if (bary2>19) and (bary2<23) and (barx2+3>arx) and (barx2+3<arx+5) then
begin
readkey;
if hak<>1 then hak:=hak-1
else
begin
renk(40,7);
gotoxy(10,11);write('Game Bitti......');
gotoxy(10,12);write(skor,' Puan Aldiniz...');
readkey;
break;
end;
end;
if (bary1=1) then
begin
bard1:=true;
barx1:=(random(3)+1)*8;
end;
if (bary1=15) then
begin
bard2:=true;
barx2:=(random(3)+1)*8;
end;
if (bard1=true) then b_araba(barx1,bary1,14);
if (bard2=true) then b_araba(barx2,bary2,0);
renk(15,3);gotoxy(38,14);Write('HIZ :'); {Yazilar}
write('Km/H':7);
gotoxy(37,6);write('Kalan Hak..:',hak);
gotoxy(37,10);write('[ESC] - Cikis');
gotoxy(37,9);write('[A/Z] - Vites');
gotoxy(37,8);write('[ D ] - Dur ');
kutu(37,12,49,12,3);
renk(4,3);
gotoxy(37,12);Write('Puan :',skor);
if hz=1 then {vitesler -H-}
begin
if g<195 then g:=g+1;
renk(15,3);
gotoxy(43,14);write(g);
kutu(37,17,49,17,1);
kutu(37,15,49,16,4);
end
else {-Y-}
begin
if g>100 then g:=g-5;
renk(15,3);
gotoxy(43,14);write(g);
kutu(37,17,49,17,0);
kutu(37,15,49,16,1);
end;
kutu(13,cy[1],13,cy[1],15);
kutu(22,cy[1],22,cy[1],15);
if cy[1]>4 then d[1]:=true;
if d[1]=true then
begin
kutu(13,by[1],13,by[1],7);
kutu(22,by[1],22,by[1],7);
by[1]:=by[1]+1;
end;
cy[1]:=cy[1]+1;
if hz=1 then delay(500)
else delay(1000);
if d[2]=true then
begin
kutu(13,cy[2],13,cy[2],15);
kutu(22,cy[2],22,cy[2],15);
if cy[2]>4 then d[3]:=true;
if d[3]=true then
begin
kutu(13,by[2],13,by[2],7);
kutu(22,by[2],22,by[2],7);
by[2]:=by[2]+1;
end;
cy[2]:=cy[2]+1;
if hz=1 then delay(500)
else delay(1000);
if cy[2]>23 then cy[2]:=1;
if by[2]>23 then by[2]:=1;
End;
if d[4]=true then
begin
kutu(13,cy[3],13,cy[3],15);
kutu(22,cy[3],22,cy[3],15);
if cy[3]>4 then d[5]:=true;
if d[5]=true then
begin
kutu(13,by[3],13,by[3],7);
kutu(22,by[3],22,by[3],7);
by[3]:=by[3]+1;
end;
cy[3]:=cy[3]+1;
delay(hz);
if cy[3]>23 then cy[3]:=1;
if by[3]>23 then by[3]:=1;
End;
if cy[1]>23 then cy[1]:=1;
if by[1]>23 then by[1]:=1;
if cy[1]>7 then d[2]:=true;
if cy[1]>14 then d[4]:=true;
if keypressed then tus:=upcase(readkey);
if (tus=#75) and (arx>7) then
begin
kutu(arx,20,arx+5,22,7);
arx:=arx-8;
end;
if (tus=#77) and (arx<20) then
begin
kutu(arx,20,arx+5,22,7);
arx:=arx+8;
end;
if tus='A' then hz:=1;
if tus='Z' then hz:=100;
if tus=#27 then break;
if tus='D' then readkey;
tus:=' ';
araba(arx,20,1);
if (bary1<29) and (bard1=true) then bary1:=bary1+1
else
begin
bary1:=1;
bard1:=false;
end;
if (bary2<29) and (bard2=true) then bary2:=bary2+1
else
begin
bary2:=1;
bard2:=false;
end;
until tus=#27;
window(1,1,80,25);
end;
begin
textmode(4);
dizi1[1]:='Yeni Oyun';
dizi1[2]:='Hakkinda';
dizi1[3]:='Cikis';
repeat
clrscr;
renk(15,15);
ekran(75);
menu(30,9,19,3,15,4,1,dizi1);
if m=1 then oyun;
if m=2 then
begin
gkutu(24,17,56,21,4,0);
renk(15,4);
gotoxy(26,18);write('K e n a n E R A R S L A N');
gotoxy(26,19);write('Gazi Osman Pasa Universitesi');
gotoxy(27,20);write('Turhal Meslek Yuksek Okulu');
gotoxy(32,21);write( '[email protected]');
readkey;
end;
if m=3 then halt;
until m=0;
end.
*****************araclar.pas**************
{
-------------Recep ERTEKİN--------------
------------G.O.P.š. T.M.Y.O.------------
--Bilgisayar Teknolojisi ve Programlama--
_________________________________________
Bu Unit Renk,Ekran,Cerceve,kutu ve hareketli menu
Yap�lmas� i‡in yaz�lm�Ÿt�r.
Kullan�mlar�:
renk(yaz�rengi,arkareng);
cerceve(x1,y1,x2,y2);
(Koordinatlar);
kutu(x1,y1,x2,y2,renk);
gkutu(x1,y1,x2,y2,renk,g”lge rengi);
ekran(karakter);
menu(x1,y1,yatay uzunluk,dikey uzunluk,cizgirengi,secilen,kuturengi,
maddelerin dizisi);
}
unit araclar;
INTERFACE
uses crt;
type
dizi=array[1..10] of string;
var
dizi1,dizi2,dizi3,dizi4:dizi;
m,sa:shortint;
procedure renk(yz,ar:shortint);
procedure cerceve(x1,y1,x2,y2:shortint);
Procedure Kutu(x1,y1,x2,y2,r:ShortInt);
Procedure GKutu(x1,y1,x2,y2,r,g:ShortInt);
Procedure Ekran(t:Word);
Procedure menu(x1,y1,uz,yuz,cr,gr,ar:shortint;
y:dizi);
IMPLEMENTATION
Procedure Renk;
Begin
TextColor(Yz);
TextBackGround(Ar);
end;
{---------------------------------------------}
Procedure Cerceve;
var
s:ShortInt;
Begin
For s:=x1+1 To x2-1 Do
Begin
GotoXY(s,y1);Write(chr(196));
GotoXY(s,y2);Write(chr(196));
End;
For s:=y1+1 To y2-1 Do
Begin
GotoXY(x1,s);Write(chr(179));
GotoXY(x2,s);Write(chr(179));
End;
GotoXY(x1,y1);Write(chr(218));
GotoXY(x2,y1);Write(chr(191));
GotoXY(x1,y2);Write(Chr(192));
GotoXY(x2,y2);Write(Chr(217));
End;
{-------------------------------------------}
Procedure kutu;
var
s1,s2:ShortInt;
Begin
textcolor(r);
For s1:=y1 To y2 Do
Begin
For s2:=x1 To x2 Do
Begin
GotoXY(s2,s1);Write(chr(219));
End;
End;
End;
{-------------------------------------------}
Procedure GKutu;
var
s1,s2:ShortInt;
Begin
textcolor(r);
For s1:=y1 To y2 Do
Begin
For s2:=x1 To x2 Do
Begin
GotoXY(s2,s1);Write(chr(219));
End;
End;
textcolor(g);
for s1:=x1+1 to x2+1 do
begin
Gotoxy(s1,y2+1);Write(chr(219));
end;
for s1:=y1+1 to y2+1 do
begin
gotoxy(x2+1,s1);Write(chr(219));
end;
End;
Procedure Ekran;
Var
s:Word;
Begin
For s:=1 To 2079 Do
Write(Chr(t));
End;
Procedure menu;
var
s,max,n:shortint;
ch:char;
begin
m:=1;
renk(cr,ar);
cerceve(x1,y1,x1+uz,y1+yuz+1);
kutu(x1+1,y1+1,x1+uz-1,y1+yuz,ar);
for s:=1 to 10 do
begin
if y<>" then
begin
renk(cr,ar);
gotoxy(x1+1,y1+s);write(s:2,' - ',y);
end;
end;
repeat
kutu(x1+1,y1+m,x1+uz-1,y1+m,gr);
renk(cr,gr);
gotoxy(x1+1,y1+m);Write(m:2,' - ',y[m]);
repeat
ch:=readkey;
until ch in [#72,#80,#27,#13];
if ch=#72 then
begin
m:=m-1;
n:=m+1;
if m<1 then m:=yuz;
kutu(x1+1,y1+n,x1+uz-1,y1+n,ar);
renk(cr,ar);
gotoxy(x1+1,y1+n);Write(n:2,' - ',y[n]);
end;
if ch=#80 then
begin
m:=m+1;
n:=m-1;
if m>yuz then
m:=1;
kutu(x1+1,y1+n,x1+uz-1,y1+n,ar);
renk(cr,ar);
gotoxy(x1+1,y1+n);Write(n:2,' - ',y[n]);
end;
if ch=#27 then m:=0;
until ch in [#13,#27];
end;
End.
bilinki kendi uğrasımdır bu yzden teşekkür edn tşekkür blur

izafet.Com - pascalda yarış oyunu var
cy,by:array [1..3] of byte;
d:array [1..5] of boolean;
bard1,bard2:boolean;
s,arx,barx1,bary1,barx2,bary2,hak:byte;
hz,g:longint;
tus:char;
regs:registers;
skor:longint;
procedure kursoryok;
begin
regs.ch:=$1F;
regs.cl:=$0;
regs.ah:=$1;
regs.al:=$0;
intr($10,regs);
end;
procedure b_araba(x1,y1,r:byte);
begin
if (y1>=1) and (y1<24) then
begin
renk(r,7);
gotoxy(x1,y1);write(chr(16));
kutu(x1+1,y1,x1+3,y1,r);
gotoxy(x1+4,y1);write(chr(17));
end;
if (y1>=2) and (y1<25) then
begin
gotoxy(x1,y1-1);write(' ');
kutu(x1+1,y1-1,x1+3,y1-1,r);
gotoxy(x1+4,y1-1);write(' ');
end;
if (y1>3) and (y1<26) then
begin
gotoxy(x1+4,y1-3);write(chr(17));
kutu(x1+1,y1-3,x1+3,y1-3,r);
gotoxy(x1,y1-3);write(chr(16));
end;
if (y1>=4) and (y1<29) then kutu(x1,y1-4,x1+4,y1-4,7);
end;
procedure araba(x1,y1,r:byte);
begin
renk(r,7);
gotoxy(x1,y1-1);Write(' ');
gotoxy(x1,y1+2);write(chr(16));
gotoxy(x1+5,y1+2);write(chr(17));
gotoxy(x1,y1);write(chr(16));
gotoxy(x1+5,y1);write(chr(17));
kutu(x1+1,y1,x1+4,y1+2,r);
renk(15,1);
gotoxy(x1+2,y1);Write(chr(254));
gotoxy(x1+3,y1);write(chr(254));
end;
procedure oyun;
begin
clrscr;
textmode(4);
renk(15,15);
ekran(1457);
for s:=1 to 5 do
d
for s:=1 to 3 do
begin
cy
by
end;
arx:=15; hz:=10000; g:=100; bary1:=1; s:=1;
barx1:=15; bary2:=1; barx2:=8; hak:=3; skor:=0;
kutu(15,1,65,25,1);
kutu(16,2,50,24,6);
kutu(20,2,46,24,7);
kutu(52,15,64,15,3);
window(16,2,65,24);
repeat
if hz=1 then skor:=skor+3;
if hz>5 then skor:=skor+1;
kursoryok;
randomize;
if (bary1>19) and (bary1<23) and (barx1+3>arx) and (barx1+3<arx+5) then
begin
readkey;
if hak<>1 then hak:=hak-1
else
begin
renk(40,7);
gotoxy(13,11);write('......Game Bitti......');
gotoxy(15,12);write(skor,' Puan Aldiniz...');
readkey;
break;
end;
end;
if (bary2>19) and (bary2<23) and (barx2+3>arx) and (barx2+3<arx+5) then
begin
readkey;
if hak<>1 then hak:=hak-1
else
begin
renk(40,7);
gotoxy(10,11);write('Game Bitti......');
gotoxy(10,12);write(skor,' Puan Aldiniz...');
readkey;
break;
end;
end;
if (bary1=1) then
begin
bard1:=true;
barx1:=(random(3)+1)*8;
end;
if (bary1=15) then
begin
bard2:=true;
barx2:=(random(3)+1)*8;
end;
if (bard1=true) then b_araba(barx1,bary1,14);
if (bard2=true) then b_araba(barx2,bary2,0);
renk(15,3);gotoxy(38,14);Write('HIZ :'); {Yazilar}
write('Km/H':7);
gotoxy(37,6);write('Kalan Hak..:',hak);
gotoxy(37,10);write('[ESC] - Cikis');
gotoxy(37,9);write('[A/Z] - Vites');
gotoxy(37,8);write('[ D ] - Dur ');
kutu(37,12,49,12,3);
renk(4,3);
gotoxy(37,12);Write('Puan :',skor);
if hz=1 then {vitesler -H-}
begin
if g<195 then g:=g+1;
renk(15,3);
gotoxy(43,14);write(g);
kutu(37,17,49,17,1);
kutu(37,15,49,16,4);
end
else {-Y-}
begin
if g>100 then g:=g-5;
renk(15,3);
gotoxy(43,14);write(g);
kutu(37,17,49,17,0);
kutu(37,15,49,16,1);
end;
kutu(13,cy[1],13,cy[1],15);
kutu(22,cy[1],22,cy[1],15);
if cy[1]>4 then d[1]:=true;
if d[1]=true then
begin
kutu(13,by[1],13,by[1],7);
kutu(22,by[1],22,by[1],7);
by[1]:=by[1]+1;
end;
cy[1]:=cy[1]+1;
if hz=1 then delay(500)
else delay(1000);
if d[2]=true then
begin
kutu(13,cy[2],13,cy[2],15);
kutu(22,cy[2],22,cy[2],15);
if cy[2]>4 then d[3]:=true;
if d[3]=true then
begin
kutu(13,by[2],13,by[2],7);
kutu(22,by[2],22,by[2],7);
by[2]:=by[2]+1;
end;
cy[2]:=cy[2]+1;
if hz=1 then delay(500)
else delay(1000);
if cy[2]>23 then cy[2]:=1;
if by[2]>23 then by[2]:=1;
End;
if d[4]=true then
begin
kutu(13,cy[3],13,cy[3],15);
kutu(22,cy[3],22,cy[3],15);
if cy[3]>4 then d[5]:=true;
if d[5]=true then
begin
kutu(13,by[3],13,by[3],7);
kutu(22,by[3],22,by[3],7);
by[3]:=by[3]+1;
end;
cy[3]:=cy[3]+1;
delay(hz);
if cy[3]>23 then cy[3]:=1;
if by[3]>23 then by[3]:=1;
End;
if cy[1]>23 then cy[1]:=1;
if by[1]>23 then by[1]:=1;
if cy[1]>7 then d[2]:=true;
if cy[1]>14 then d[4]:=true;
if keypressed then tus:=upcase(readkey);
if (tus=#75) and (arx>7) then
begin
kutu(arx,20,arx+5,22,7);
arx:=arx-8;
end;
if (tus=#77) and (arx<20) then
begin
kutu(arx,20,arx+5,22,7);
arx:=arx+8;
end;
if tus='A' then hz:=1;
if tus='Z' then hz:=100;
if tus=#27 then break;
if tus='D' then readkey;
tus:=' ';
araba(arx,20,1);
if (bary1<29) and (bard1=true) then bary1:=bary1+1
else
begin
bary1:=1;
bard1:=false;
end;
if (bary2<29) and (bard2=true) then bary2:=bary2+1
else
begin
bary2:=1;
bard2:=false;
end;
until tus=#27;
window(1,1,80,25);
end;
begin
textmode(4);
dizi1[1]:='Yeni Oyun';
dizi1[2]:='Hakkinda';
dizi1[3]:='Cikis';
repeat
clrscr;
renk(15,15);
ekran(75);
menu(30,9,19,3,15,4,1,dizi1);
if m=1 then oyun;
if m=2 then
begin
gkutu(24,17,56,21,4,0);
renk(15,4);
gotoxy(26,18);write('K e n a n E R A R S L A N');
gotoxy(26,19);write('Gazi Osman Pasa Universitesi');
gotoxy(27,20);write('Turhal Meslek Yuksek Okulu');
gotoxy(32,21);write( '[email protected]');
readkey;
end;
if m=3 then halt;
until m=0;
end.
*****************araclar.pas**************
{
-------------Recep ERTEKİN--------------
------------G.O.P.š. T.M.Y.O.------------
--Bilgisayar Teknolojisi ve Programlama--
_________________________________________
Bu Unit Renk,Ekran,Cerceve,kutu ve hareketli menu
Yap�lmas� i‡in yaz�lm�Ÿt�r.
Kullan�mlar�:
renk(yaz�rengi,arkareng);
cerceve(x1,y1,x2,y2);
(Koordinatlar);
kutu(x1,y1,x2,y2,renk);
gkutu(x1,y1,x2,y2,renk,g”lge rengi);
ekran(karakter);
menu(x1,y1,yatay uzunluk,dikey uzunluk,cizgirengi,secilen,kuturengi,
maddelerin dizisi);
}
unit araclar;
INTERFACE
uses crt;
type
dizi=array[1..10] of string;
var
dizi1,dizi2,dizi3,dizi4:dizi;
m,sa:shortint;
procedure renk(yz,ar:shortint);
procedure cerceve(x1,y1,x2,y2:shortint);
Procedure Kutu(x1,y1,x2,y2,r:ShortInt);
Procedure GKutu(x1,y1,x2,y2,r,g:ShortInt);
Procedure Ekran(t:Word);
Procedure menu(x1,y1,uz,yuz,cr,gr,ar:shortint;
y:dizi);
IMPLEMENTATION
Procedure Renk;
Begin
TextColor(Yz);
TextBackGround(Ar);
end;
{---------------------------------------------}
Procedure Cerceve;
var
s:ShortInt;
Begin
For s:=x1+1 To x2-1 Do
Begin
GotoXY(s,y1);Write(chr(196));
GotoXY(s,y2);Write(chr(196));
End;
For s:=y1+1 To y2-1 Do
Begin
GotoXY(x1,s);Write(chr(179));
GotoXY(x2,s);Write(chr(179));
End;
GotoXY(x1,y1);Write(chr(218));
GotoXY(x2,y1);Write(chr(191));
GotoXY(x1,y2);Write(Chr(192));
GotoXY(x2,y2);Write(Chr(217));
End;
{-------------------------------------------}
Procedure kutu;
var
s1,s2:ShortInt;
Begin
textcolor(r);
For s1:=y1 To y2 Do
Begin
For s2:=x1 To x2 Do
Begin
GotoXY(s2,s1);Write(chr(219));
End;
End;
End;
{-------------------------------------------}
Procedure GKutu;
var
s1,s2:ShortInt;
Begin
textcolor(r);
For s1:=y1 To y2 Do
Begin
For s2:=x1 To x2 Do
Begin
GotoXY(s2,s1);Write(chr(219));
End;
End;
textcolor(g);
for s1:=x1+1 to x2+1 do
begin
Gotoxy(s1,y2+1);Write(chr(219));
end;
for s1:=y1+1 to y2+1 do
begin
gotoxy(x2+1,s1);Write(chr(219));
end;
End;
Procedure Ekran;
Var
s:Word;
Begin
For s:=1 To 2079 Do
Write(Chr(t));
End;
Procedure menu;
var
s,max,n:shortint;
ch:char;
begin
m:=1;
renk(cr,ar);
cerceve(x1,y1,x1+uz,y1+yuz+1);
kutu(x1+1,y1+1,x1+uz-1,y1+yuz,ar);
for s:=1 to 10 do
begin
if y
begin
renk(cr,ar);
gotoxy(x1+1,y1+s);write(s:2,' - ',y
end;
end;
repeat
kutu(x1+1,y1+m,x1+uz-1,y1+m,gr);
renk(cr,gr);
gotoxy(x1+1,y1+m);Write(m:2,' - ',y[m]);
repeat
ch:=readkey;
until ch in [#72,#80,#27,#13];
if ch=#72 then
begin
m:=m-1;
n:=m+1;
if m<1 then m:=yuz;
kutu(x1+1,y1+n,x1+uz-1,y1+n,ar);
renk(cr,ar);
gotoxy(x1+1,y1+n);Write(n:2,' - ',y[n]);
end;
if ch=#80 then
begin
m:=m+1;
n:=m-1;
if m>yuz then
m:=1;
kutu(x1+1,y1+n,x1+uz-1,y1+n,ar);
renk(cr,ar);
gotoxy(x1+1,y1+n);Write(n:2,' - ',y[n]);
end;
if ch=#27 then m:=0;
until ch in [#13,#27];
end;
End.
bilinki kendi uğrasımdır bu yzden teşekkür edn tşekkür blur
