TeknoTR  

Geri Dön   TeknoTR > Webmasterler için > Programlama
Üye Ol SSS Sxe indir Sosyal Gruplar Takvim Resim Galerisi Etiketler Bütün Forumları okunmuş kabul et

Pascal'da Zeka Oyunu

Programlama bölümünde Pascal'da Zeka Oyunu konusu , Taslari belirlenen simglere belirli zeka adim süresinde yerlestirmeniz gerekiyor uses crt,dos,graph; const {BUTONUN PASIF OLMA KORDINATLARI} buton_pasif:array [0..14,0..3] of integer= ( (1,40,0,15),(1,1,1,15), (60,1,1,15),(2,39,0,15),(2,2,1,15), (59,2,1,15), (1,40,0,8), (60,40,1,8),(60,1,1,8), (2,39,0,8), (59,39,1,8),(59,2,1,8), (3,38,0,8), (58,38,1,88),(58,3,1,88) ); {BUTONUN AKTIF OLMA KORDINATLARI} buton_aktif:array [0..17,0..3] of integer= ( ...

Cevapla
 
LinkBack Konu Seçenekleri
Eski 12-06-2007, 14:40   #1 (permalink)
Onursal Üye
 
stromper - ait Avatar
 
Giriş: 02-08-2007
Yaş: 27
Mesajlar: 10.389
Rep Puanı: 7866
stromper Rütbe Artı +11stromper Rütbe Artı +11stromper Rütbe Artı +11stromper Rütbe Artı +11stromper Rütbe Artı +11stromper Rütbe Artı +11stromper Rütbe Artı +11stromper Rütbe Artı +11stromper Rütbe Artı +11stromper Rütbe Artı +11stromper Rütbe Artı +11
Rep Gücü: 156
E-Güven: (7/100)

Pascal'da Zeka Oyunu


Taslari belirlenen simglere belirli zeka adim süresinde yerlestirmeniz gerekiyor



uses crt,dos,graph;

const

{BUTONUN PASIF OLMA KORDINATLARI}

buton_pasif:array [0..14,0..3] of integer= (

(1,40,0,15),(1,1,1,15), (60,1,1,15),(2,39,0,15),(2,2,1,15), (59,2,1,15),

(1,40,0,8), (60,40,1,8),(60,1,1,8), (2,39,0,8), (59,39,1,8),(59,2,1,8),

(3,38,0,8), (58,38,1,88),(58,3,1,88) );



{BUTONUN AKTIF OLMA KORDINATLARI}

buton_aktif:array [0..17,0..3] of integer= (

(1,40,0,8),(1,1,1,8), (60,1,1,8),(2,39,0,8),(2,2,1,8), (59,2,1,8),

(3,38,0,8),(3,3,1,8), (58,3,1,8),

(1,40,0,15), (60,40,1,15),(60,1,1,15), (2,39,0,15), (59,39,1,15),(59,2,1,15),

(3,38,0,15), (58,38,1,15),(58,3,1,15) );



{BUTONUN YARI AKTIF OLMA KORDINATLARI}

buton_yari_aktif:array [0..9,0..3] of integer= (

(1,1,0,15),(1,40,1,15),(60,40,1,15),(60,1,1,15),(1 ,1,1,15),

(2,3,0,15),(2,39,1,15),(59,39,1,15),(59,2,1,15),(2 ,2,1,15)

);

{BUTONUN USTUNE YAZILACAK LEVER ADLARI }

lever_yaz:array[0..9] of string=(

'Lvr 1','Lvr 2','Lvr 3','Lvr 4','Lvr 5','Lvr 6',

'Lvr 7','Lvr 8','Lvr 9','Lvr 10'

);

{ LEE KARAKTERININ GERIYE GIDERKEN KI KORDINATLARI }

lee_geri:array[0..39,0..4]of integer=((17,9,0,0,0),(17,9,1,0,0),

(25,9,0,0,0),(25,9,1,0,0),

(20,12,0,1,0),(17,9,0,1,1),(25,9,0,1,1),(18,17,0,0 ,0),(23,17,1,0,0),

{g”vde ve bacaklar}

(15,20,0,0,0),(15,25,1,0,0),(10,22,1,0,0),(8,30,1, 0,0),(20,32,1,0,0),

(21,36,1,0,0),(29,36,1,0,0),(28,30,1,0,0),(25,25,1 ,0,0),(25,20,1,0,0),(15,20,1,0,0),

{kollar}

(7,13,0,0,0),(5,16,1,0,0),(15,24,1,0,0),(15,20,1,0 ,0),(7,13,1,0,0),

(17,27,0,0,0),(17,32,1,0,0),(25,23,1,0,0),(25,19,1 ,0,0),(17,27,1,0,0),

{ayakkabilar}

(9,21,0,0,0),(7,30,1,0,0),(4,28,1,0,0),(7,18,1,0,0 ),(9,20,1,0,0),

(21,35,0,0,0),(30,35,1,0,0),(30,37,1,0,0),(21,37,1 ,0,0),(21,35,1,0,0)

);

{ LEE KARAKTERININ ILERI GIDERKEN KI KORDINATLARI }

lee_ileri:array[0..41,0..4]of integer=(



(11,9,0,0,0),(11,9,1,0,0),(19,9,0,0,0),(19,9,1,0,0 ),

(14,12,0,1,0),(11,9,0,1,1),(19,9,0,1,1),(12,15,0,0 ,0),(18,18,1,0,0),

(12,18,1,0,0),(12,15,1,0,0),

{g”vde ve bacaklar}

(09,20,0,0,0),(09,24,1,0,0),(6,30,1,0,0),(6,35,1,0 ,0),(14,35,1,0,0),

(14,33,1,0,0),(26,30,1,0,0),(23,23,1,0,0),(19,25,1 ,0,0),(19,20,1,0,0),(09,20,1,0,0),

{kollar}

(27,13,0,0,0),(29,15,1,0,0),(19,25,1,0,0),(19,20,1 ,0,0),(27,13,1,0,0),

(21,27,0,0,0),(19,30,1,0,0),(7,23,1,0,0),(7,18,1,0 ,0),(22,27,1,0,0),

{ayakkabilar}

(23,23,0,0,0),(25,30,1,0,0),(28,29,1,0,0),(25,21,1 ,0,0),(23,23,1,0,0),

(5,36,0,0,0), (14,36,1,0,0),(14,37,1,0,0),(5,37,1,0,0),(5,35,1,0 ,0)

);

{ HEDEFLARE KOYULACAK KASA NESNESININ ORDINATLARI }

kasa:array[0..44,0..3] of integer=(

(2,38,0,15),(2,2,1,15),(38,2,1,15),(38,38,1,88),(2 ,38,1,88),

(3,37,0,7), (3,3,1,7), (37,3,1,7), (37,37,1,7), (3,37,1,7),

(4,36,0,7), (4,4,1,7), (36,4,1,7), (36,36,1,7), (4,36,1,7),

(5,35,0,7), (5,5,1,7), (35,5,1,7), (35,35,1,7), (5,35,1,7),

(6,34,0,7), (6,6,1,7), (34,6,1,7), (34,34,1,7), (6,34,1,7),

(7,33,0,7), (7,7,1,7), (33,7,1,7), (33,33,1,7), (7,33,1,7),

(8,32,0,7), (8,8,1,7), (32,8,1,7), (32,32,1,7), (8,32,1,7),

(9,31,0,7), (9,9,1,7), (31,9,1,7), (31,31,1,7), (9,31,1,7),

(10,30,0,88),(10,10,1,88),(30,10,1,88),(30,30,1,15 ),(10,30,1,15)

);



{ BOXWORLD YAZISININ 'B' KARAKTERI }

iB:array[0..9,0..7] of integer=((1,1,1,1,1,1,1,0),

(1,1,1,1,1,1,1,1),

(1,1,0,0,0,0,1,1),

(1,1,0,0,0,0,1,1),

(1,1,1,1,1,1,1,0),

(1,1,1,1,1,1,1,0),

(1,1,0,0,0,0,1,1),

(1,1,0,0,0,0,1,1),

(1,1,1,1,1,1,1,1),

(1,1,1,1,1,1,1,0));

{ BOXWORLD YAZISININ 'O' KARAKTERI }

iO:array[0..9,0..7] of integer=((0,1,1,1,1,1,1,0),

(1,1,1,1,1,1,1,1),

(1,1,0,0,0,0,1,1),

(1,1,0,0,0,0,1,1),

(1,1,0,0,0,0,1,1),

(1,1,0,0,0,0,1,1),

(1,1,0,0,0,0,1,1),

(1,1,0,0,0,0,1,1),

(1,1,1,1,1,1,1,1),

(0,1,1,1,1,1,1,0));

{ BOXWORLD YAZISININ 'X' KARAKTERI }

iX:array[0..9,0..7] of integer=((1,1,0,0,0,0,1,1),

(1,1,0,0,0,0,1,1),

(0,1,1,0,0,1,1,0),

(0,1,1,0,0,1,1,0),

(0,0,1,1,1,1,0,0),

(0,0,0,1,1,0,0,0),

(0,1,1,1,1,1,1,0),

(0,1,1,0,0,1,1,0),

(1,1,0,0,0,0,1,1),

(1,1,0,0,0,0,1,1));

{ BOXWORLD YAZISININ 'W' KARAKTERI }

iW:array[0..9,0..7] of integer=((1,1,0,0,0,0,1,1),

(1,1,0,0,0,0,1,1),

(1,1,0,0,0,0,1,1),

(1,1,0,0,0,0,1,1),

(1,1,0,0,0,0,1,1),

(1,1,0,1,1,0,1,1),

(1,1,0,1,1,0,1,1),

(1,1,0,1,1,0,1,1),

(0,1,1,0,0,1,1,0),

(0,0,1,0,0,1,0,0));

{ BOXWORLD YAZISININ 'O' KARAKTERI }

iO2:array[0..9,0..7] of integer=((0,1,1,1,1,1,1,0),

(1,1,1,1,1,1,1,1),

(1,1,0,0,0,0,1,1),

(1,1,0,0,0,0,1,1),

(1,1,0,0,0,0,1,1),

(1,1,0,0,0,0,1,1),

(1,1,0,0,0,0,1,1),

(1,1,0,0,0,0,1,1),

(1,1,1,1,1,1,1,1),

(0,1,1,1,1,1,1,0));

{ BOXWORLD YAZISININ 'R' KARAKTERI }

iR:array[0..9,0..7] of integer=((1,1,1,1,1,1,1,0),

(1,1,1,1,1,1,1,1),

(1,1,0,0,0,0,1,1),

(1,1,0,0,0,0,1,1),

(1,1,1,1,1,1,1,1),

(1,1,1,1,1,1,1,0),

(1,1,0,1,1,0,0,0),

(1,1,0,0,1,1,0,0),

(1,1,0,0,0,1,1,0),

(1,1,0,0,0,0,1,1));

{ BOXWORLD YAZISININ 'L' KARAKTERI }

iL:array[0..9,0..7] of integer=((1,1,0,0,0,0,0,0),

(1,1,0,0,0,0,0,0),

(1,1,0,0,0,0,0,0),

(1,1,0,0,0,0,0,0),

(1,1,0,0,0,0,0,0),

(1,1,0,0,0,0,0,0),

(1,1,0,0,0,0,0,0),

(1,1,0,0,0,0,0,0),

(1,1,1,1,1,1,1,1),

(1,1,1,1,1,1,1,1));

{ BOXWORLD YAZISININ 'D' KARAKTERI }

iD:array[0..9,0..7] of integer=((1,1,1,1,1,1,1,0),

(1,1,1,1,1,1,1,1),

(1,1,0,0,0,0,1,1),

(1,1,0,0,0,0,1,1),

(1,1,0,0,0,0,1,1),

(1,1,0,0,0,0,1,1),

(1,1,0,0,0,0,1,1),

(1,1,0,0,0,0,1,1),

(1,1,1,1,1,1,1,1),

(1,1,1,1,1,1,1,0));



label

tekrar_basla,devam_lever,mouse_oku;

var

ks_gr_dn:array [0..3]of integer;

le_gr_dn:array [0..3]of integer;



regs:registers;

m_x,m_y,m_button,mo_x,mo_y,mo_button:integer;

x1,y1,x2,y2:integer;



kx1,ky1,kx2,ky2,kx3,ky3,kx4,ky4,kx5,ky5,kx6,ky6:in teger;



K1,K2,K3,K4,K5,K6:BOOLEAN;

cx1,cx2,cx3,cx4,cx5,cx6:integer;

cy1,cy2,cy3,cy4,cy5,cy6:integer;



btn1,btn2,btn3,btn4,btn5,btn6,btn7,btn8,btn9,btn10 :boolean;

acilis,btn_ustunde:boolean;

kx,ky:integer;

sx,sy:integer;

yx,yy:integer;

mx,my:integer;

renkkontrol:byte;

s1,s2,s3:string;

gd,gm:integer;

x,y,a,a1,a2,ks:integer;

deg:string;

lever_ata:byte;

tus:char;

cal,oyun_aktif:boolean;

dur:longint;

eniyi_tasima,sizin_tasima:integer;



kx1_boya,kx2_boya,kx3_boya,kx4_boya,kx5_boya,kx6_b oya:boolean;

k1_ok,k2_ok,k3_ok,k4_ok,k5_ok,k6_ok:boolean;

bitis,hdf_say:byte;

{ GRAFIK EKRANE GECIS PROCEDUR U }

procedure grafik;

begin

gd:=detect;

initgraph(gd,gm,'c:\progra~1\tpascal\bgi');

if graphresult<>0 then begin write('hata'); readln; halt; end;



end;



function mouseinit:boolean;

var

t:integer;

begin

asm

mov ax,0

int 33h

mov t,ax

end;

if t=0 then

mouseinit:=false else mouseinit:=true;

end;

procedure mousegoster;

begin

asm

mov ax,1

int 33h

end;

end;

procedure mousesakla;

begin

asm

mov ax,2

int 33h

end;

end;

procedure getmousecoords(var x,y,button:integer);

var xx,yy,bb:integer;

begin

asm

mov ax,3

int 33h

mov xx,cx

mov yy,dx

mov bb,bx

end;

x:=xx;

y:=yy;

button:=bb;

end;

{/////////////////// LEVER /////////////////////////////}

{ CIRCLE HEDEFLERININ ICINI GRI VEYA KIRMIZI RENKTE DOLDURUR}

procedure circle_doldur(x,y,r,renk:integer);

var i:integer;

begin

if (getpixel(x+12,y-12)=7) then

begin setfillstyle(1,red);

end

else begin setfillstyle(1,yellow); end;

setcolor(yellow);

fillellipse(x,y,r,r);



end;



procedure lever1;

begin



setfillstyle(1,4);



bar(220,130,440,140);

bar(220,140,230,220);

bar(180,210,230,220);

bar(180,220,190,300);

bar(180,300,230,310);

bar(220,310,230,350);

bar(220,340,470,350);

bar(470,270,480,350);

bar(470,260,520,270);

bar(510,170,520,270);

bar(440,170,510,180);

bar(430,130,440,180);



bar(270,180,390,220);

bar(310,260,350,350);



setcolor(7);

circle(290,280,8); circle_doldur(290,280,8,7);

circle(250,280,8); circle_doldur(250,280,8,7);

circle(290,320,8); circle_doldur(290,320,8,7);

circle(250,320,8); circle_doldur(250,320,8,7);

cx1:=290; cx2:=250; cx3:=290; cx4:=250;

cy1:=280; cy2:=280; cy3:=320; cy4:=320;



k1:=true;k2:=true;k3:=true;k4:=true;

k5:=false;k6:=false;

eniyi_tasima:=27;

hdf_say:=4;

end;



procedure lever2;

begin



setfillstyle(1,4);

bar(200,150,340,160);

bar(200,150,210,290);

bar(200,280,290,290);

bar(280,280,290,360);

bar(240,350,290,360);

bar(240,350,250,450);

bar(240,440,380,450);

bar(370,400,380,450);

bar(370,400,500,410);

bar(490,230,500,410);

bar(440,230,500,240);

bar(440,240,450,320);

bar(330,310,450,320);

bar(330,150,340,320); bar(370,360,410,400);

setcolor(7);

circle(470,260,8); circle_doldur(470,260,8,7);

circle(470,300,8); circle_doldur(470,300,8,7);

circle(470,340,8); circle_doldur(470,340,8,7);

cx1:=470; cx2:=470; cx3:=470;

cy1:=260; cy2:=300; cy3:=340;

k1:=true;k2:=true;k3:=true;

k4:=false;k5:=false;k6:=false;

eniyi_tasima:=31;

hdf_say:=3;

end;



procedure lever3;

begin



setfillstyle(1,4);

bar(240,90,460,100);

bar(240,90,250,140);

bar(120,130,250,140);

bar(120,130,130,350);

bar(120,340,170,350);

bar(160,340,170,470);

bar(160,460,580,470);

bar(570,370,580,470);

bar(490,370,580,380);

bar(490,220,500,380);

bar(450,210,500,220);

bar(450,90,460,210); {}

bar(250,180,290,220); bar(290,140,410,180);

bar(170,180,210,300); bar(210,300,250,340);

bar(210,380,330,420); bar(330,340,370,380);

bar(410,260,450,380); bar(370,220,410,260);

bar(370,420,450,460);

setcolor(7);

circle(270,160,8); circle_doldur(270,160,8,7);

circle(190,320,8); circle_doldur(190,320,8,7);

circle(350,400,8); circle_doldur(350,400,8,7);

circle(430,240,8); circle_doldur(430,240,8,7);

circle(310,280,8); circle_doldur(310,280,8,7);



cx1:=270; cx2:=190; cx3:=350; cx4:=430; cx5:=310;

cy1:=160; cy2:=320; cy3:=400; cy4:=240; cy5:=280;

k1:=true;k2:=true;k3:=true;k4:=true;k5:=true;

k6:=false;

eniyi_tasima:=22;

hdf_say:=5;

end;



procedure lever4;

begin

setfillstyle(1,4);

bar(250,110,470,120);

bar(250,120,260,160);

bar(210,150,260,160);

bar(210,150,220,320);

bar(130,310,210,320);

bar(130,310,140,370);

bar(130,360,430,370);

bar(420,280,430,370);

bar(430,280,470,290);

bar(460,110,470,290);

{} bar(340,120,380,200);

bar(300,240,340,280); bar(340,240,380,320);

setcolor(7);

circle(160,340,8); circle_doldur(160,340,8,7);

circle(200,340,8); circle_doldur(200,340,8,7);

circle(240,340,8); circle_doldur(240,340,8,7);

circle(280,340,8); circle_doldur(280,340,8,7);

circle(320,340,8); circle_doldur(320,340,8,7);



cx1:=160; cx2:=200; cx3:=240; cx4:=280; cx5:=320;

cy1:=340; cy2:=340; cy3:=340; cy4:=340; cy5:=340;

k1:=true;k2:=true;k3:=true;k4:=true;k5:=true;

k6:=false;

eniyi_tasima:=30;

hdf_say:=5;

end;



procedure lever5;

begin

setfillstyle(1,4);

bar(280,120,460,130);

bar(280,120,290,170);

bar(200,160,290,170);

bar(200,160,210,210);

bar(160,200,210,210);

bar(160,200,170,300);

bar(160,290,370,300);

bar(360,290,370,340);

bar(360,330,460,340);

bar(450,250,460,340);

bar(450,250,500,260);

bar(490,200,500,260);

bar(450,200,500,210);

bar(450,120,460,210); bar(330,170,410,210);

setcolor(7);

circle(230,190,8); circle_doldur(230,190,8,7);

circle(230,230,8); circle_doldur(230,230,8,7);

circle(230,270,8); circle_doldur(230,270,8,7);

circle(190,230,8); circle_doldur(190,230,8,7);

circle(190,270,8); circle_doldur(190,270,8,7);



cx1:=230; cx2:=230; cx3:=230; cx4:=190; cx5:=190;

cy1:=190; cy2:=230; cy3:=270; cy4:=230; cy5:=270;



k1:=true;k2:=true;k3:=true;k4:=true;k5:=true;

k6:=false;



eniyi_tasima:=16;



hdf_say:=5;

end;



procedure lever6;

begin

setfillstyle(1,4);

bar(200,130,490,140); bar(290,140,370,180);

bar(200,130,210,340);

bar(160,330,210,340); bar(290,220,410,260);

bar(160,330,170,430); bar(250,260,290,340);

bar(160,420,530,430); bar(410,260,450,340);

bar(530,330,540,430);

bar(490,330,540,340); bar(370,380,410,420);

bar(490,130,500,340);

setcolor(7);

circle(310,280,8); circle_doldur(310,280,8,7);

circle(350,280,8); circle_doldur(350,280,8,7);

circle(390,280,8); circle_doldur(390,280,8,7);

circle(310,320,8); circle_doldur(310,320,8,7);

circle(350,320,8); circle_doldur(350,320,8,7);

circle(390,320,8); circle_doldur(390,320,8,7);



cx1:=310; cx2:=350; cx3:=390; cx4:=310; cx5:=350; cx6:=390;

cy1:=280; cy2:=280; cy3:=280; cy4:=320; cy5:=320; cy6:=320;

k1:=true;k2:=true;k3:=true;k4:=true;k5:=true;k6:=t rue;



eniyi_tasima:=39;



hdf_say:=6;

end;



procedure lever7;

begin

setfillstyle(1,4);

bar(290,150,470,160);

bar(290,150,300,240);

bar(210,230,300,240);

bar(210,230,220,330);

bar(210,320,340,330);

bar(330,320,340,370);

bar(330,360,430,370);

bar(420,280,430,370);

bar(420,280,470,290);

bar(460,150,470,290);

setcolor(7);



circle(360,260,8); circle_doldur(360,260,8,7);

circle(400,260,8); circle_doldur(400,260,8,7);

circle(320,300,8); circle_doldur(320,300,8,7);

circle(360,300,8); circle_doldur(360,300,8,7);

circle(400,300,8); circle_doldur(400,300,8,7);



cx1:=360; cx2:=400; cx3:=320; cx4:=360; cx5:=400;

cy1:=260; cy2:=260; cy3:=300; cy4:=300; cy5:=300;



k1:=true;k2:=true;k3:=true;k4:=true;k5:=true;

k6:=false;

eniyi_tasima:=13;



hdf_say:=5;

end;



procedure lever8;

begin

setfillstyle(1,4);

bar(200,150,300,160);

bar(200,150,210,200);

bar(160,190,210,200);

bar(160,190,170,290);

bar(160,280,210,290);

bar(200,280,210,330);

bar(200,320,540,330);

bar(530,280,540,330);

bar(530,280,580,290);

bar(570,150,580,290);

bar(440,150,580,160);

bar(440,150,450,240);

bar(290,230,450,240); bar(370,280,410,320);

bar(290,150,300,240);

setcolor(7);

circle(310,260,8); circle_doldur(310,260,8,7);

circle(350,260,8); circle_doldur(350,260,8,7);

circle(390,260,8); circle_doldur(390,260,8,7);

circle(430,260,8); circle_doldur(430,260,8,7);



cx1:=310; cx2:=350; cx3:=390; cx4:=430;

cy1:=260; cy2:=260; cy3:=260; cy4:=260;

k1:=true;k2:=true;k3:=true;k4:=true;k5:=false;

k6:=false;

eniyi_tasima:=18;

hdf_say:=4;

end;



procedure lever9;

begin

setfillstyle(1,4);

bar(290,150,430,160);

bar(290,150,300,200);

bar(210,190,300,200);

bar(210,190,220,290);

bar(210,280,300,290);

bar(290,280,300,370);

bar(290,360,430,370);

bar(420,320,430,370);

bar(420,320,470,330);

bar(460,230,470,330);

bar(420,230,470,240);

bar(420,150,430,240);

setcolor(7);

circle(320,260,8); circle_doldur(320,260,8,7);

circle(400,260,8); circle_doldur(400,260,8,7);

circle(360,220,8); circle_doldur(360,220,8,7);

circle(360,300,8); circle_doldur(360,300,8,7);



cx1:=320; cx2:=400; cx3:=360; cx4:=360;

cy1:=260; cy2:=260; cy3:=220; cy4:=300;



k1:=true;k2:=true;k3:=true;k4:=true;

k5:=false;k6:=false;

eniyi_tasima:=7;

hdf_say:=4;

end;



procedure lever10;

begin

setfillstyle(1,4);

bar(290,120,390,130);

bar(290,130,300,210);

bar(250,200,300,210);

bar(250,200,260,290);

bar(210,280,260,290);

bar(210,280,220,380);

bar(210,370,470,380);

bar(460,280,470,380);

bar(420,280,470,290);

bar(420,200,430,290);

bar(380,200,430,210);

bar(380,120,390,210);

bar(300,290,340,330);

setcolor(7);



circle(320,150,8); circle_doldur(320,150,8,7);

circle(360,150,8); circle_doldur(360,150,8,7);

circle(360,190,8); circle_doldur(360,190,8,7);

circle(400,230,8); circle_doldur(400,230,8,7);



cx1:=320; cx2:=360; cx3:=360; cx4:=400;

cy1:=150; cy2:=150; cy3:=190; cy4:=230;



k1:=true;k2:=true;k3:=true;k4:=true;

k5:=false;k6:=false;



eniyi_tasima:=16;

hdf_say:=4;

end;



{/////////////////////LEVER //////////////////////////////////////}



{ ISTENILEN KORDINATLARA PENCERE CIZER }

procedure pencere(px1,py1,px2,py2:integer);

begin

setcolor(15); moveto(px1,py2); lineto(px1,py1); lineto(px2,py1);

setcolor(88); lineto(px2,py2); lineto(px1,py2);

setcolor(15); moveto(px1+3,py2-4); lineto(px2-4,py2-4); lineto(px2-4,py1+4);

setcolor(88); lineto(px1+3,py1+4); lineto(px1+4,py2-4);

setcolor(7);

for a:=1 to 3 do

begin

moveto(px1+a,py2-a); lineto(px1+a,py1+a); lineto(px2-a,py1+a);

lineto(px2-a,py2-a); lineto(px1+a,py2-a);

moveto(px1+a,py2-a); lineto(px2-a,py2-a); lineto(px2-a,py1+a);

lineto(px1+a,py1+a); lineto(px1+a,py2-a);

end;



end;



procedure cerceve;

begin



setcolor(white);

line(100,75,610,75); line(100,75,100,479);

line(105,474,605,474); line(605,80,605,474);

setcolor(88);

line(100,479,610,479); line(610,75,610,479);

line(105,80,605,80); line(105,80,105,474);

setcolor(7);

rectangle(101,76,609,478); rectangle(102,77,608,477);

rectangle(103,78,607,476); rectangle(104,79,606,475);



end;

{ SECILEN LEVERI TANIR }

procedure lever_goster;

begin

mousesakla;

if lever_ata=0 then lever1;

if lever_ata=1 then lever2;

if lever_ata=2 then lever3;

if lever_ata=3 then lever4;

if lever_ata=4 then lever5;

if lever_ata=5 then lever6;

if lever_ata=6 then lever7;

if lever_ata=7 then lever8;

if lever_ata=8 then lever9;

if lever_ata=9 then lever10;

mousegoster;

end;

{ TANINAN LEVER E AIT BUTONLARI DOSER }

procedure butonlari_dose;

begin mousesakla;

pencere(0,0,640,52);

for x:=0 to 9 do

begin

if lever_ata<>x then

begin

for y:=0 to 14 do

begin

if buton_pasif[y,2]=0 then

moveto(buton_pasif[y,0]+x*63+5,buton_pasif[y,1]+5)

else begin setcolor(buton_pasif[y,3]);

lineto(buton_pasif[y,0]+x*63+5,buton_pasif[y,1]+5);

end;

end;

setfillstyle(1,7); bar(3+x*63+5,3+5,57+x*63+5,37+5);

setcolor(88); outtextxy(10+x*63+5,15+5,lever_yaz[x]);

setcolor(15); outtextxy(10+x*63+6,15+6,lever_yaz[x]);



end



else

begin

setfillstyle(1,7); bar(4+x*63+5,4+5,57+x*63+5,37+5);

setcolor(15); outtextxy(10+x*63+5,15+5,lever_yaz[x]);

setcolor(88); outtextxy(10+x*63+6,15+6,lever_yaz[x]); end;



end;

mousegoster;

END;



{ SECILEN BUTON DISINDAKI AKTIF BUTONLARI PASIF YAPAR}

procedure butonlari_pasifyap;

begin mousesakla;

setfillstyle(1,BLACK); bar(1,1,640,480);

for y:=0 to 17 do

begin

if buton_aktif[y,2]=0 then

moveto(buton_aktif[y,0]+lever_ata*63+5,buton_aktif[y,1]+5)

else

begin

setcolor(buton_aktif[y,3]);

lineto(buton_aktif[y,0]+lever_ata*63+5,buton_aktif[y,1]+5);

end;

end;

setfillstyle(1,7); bar(4+lever_ata*63+5,4+5,57+lever_ata*63+5,37+5);



mousegoster;

end;

{ MOUSE ILE UZERINA GELINEN BUTONLARI YARI AKTIF YAPAR }

procedure butonlari_yari_aktifyap;

begin mousesakla;



for y:=0 to 9 do

begin

if buton_yari_aktif[y,2]=0 then

moveto(buton_yari_aktif[y,0]+lever_ata*63+5,buton_yari_aktif[y,1]+5)

else

begin

setcolor(buton_yari_aktif[y,3]);

lineto(buton_yari_aktif[y,0]+lever_ata*63+5,buton_yari_aktif[y,1]+5);

end;

end;



btn_ustunde:=false; mousegoster;

end;



{ YON TUSLARI ILE KORDINATLARI DEGISTIRILEN KASALARIN

YERINI DEGISTIRIR }



procedure kasa_oynat;

begin bitis:=0; mousesakla;

if k1=true then

begin

if getpixel(cx1,cy1)=red then inc(bitis);

for ks:=0 to 44 do begin

if kasa[ks,2]=0 then

moveto(kasa[ks,0]+kx1,kasa[ks,1]+ky1)

else

begin

setcolor(kasa[ks,3]);

lineto(kasa[ks,0]+kx1,kasa[ks,1]+ky1);

end;

end;

end;



if k2=true then

begin

if getpixel(cx2,cy2)=red then inc(bitis);

for ks:=0 to 44 do

begin

if kasa[ks,2]=0 then

moveto(kasa[ks,0]+kx2,kasa[ks,1]+ky2)

else

begin

setcolor(kasa[ks,3]);

lineto(kasa[ks,0]+kx2,kasa[ks,1]+ky2);

end;

end;

end;



if k3=true then

begin

if getpixel(cx3,cy3)=red then inc(bitis);

for ks:=0 to 44 do

begin

if kasa[ks,2]=0 then

moveto(kasa[ks,0]+kx3,kasa[ks,1]+ky3)

else

begin

setcolor(kasa[ks,3]);

lineto(kasa[ks,0]+kx3,kasa[ks,1]+ky3);

end;

end;

end;



if k4=true then

begin

if getpixel(cx4,cy4)=red then inc(bitis);

for ks:=0 to 44 do

begin

if kasa[ks,2]=0 then

moveto(kasa[ks,0]+kx4,kasa[ks,1]+ky4)

else

begin

setcolor(kasa[ks,3]);

lineto(kasa[ks,0]+kx4,kasa[ks,1]+ky4);

end;

end;

end;



if k5=true then

begin

if getpixel(cx5,cy5)=red then inc(bitis);

for ks:=0 to 44 do

begin

if kasa[ks,2]=0 then

moveto(kasa[ks,0]+kx5,kasa[ks,1]+ky5)

else

begin

setcolor(kasa[ks,3]);

lineto(kasa[ks,0]+kx5,kasa[ks,1]+ky5);

end;

end;

end;



if k6=true then

begin

if getpixel(cx6,cy6)=red then inc(bitis);

for ks:=0 to 44 do

begin

if kasa[ks,2]=0 then

moveto(kasa[ks,0]+kx6,kasa[ks,1]+ky6)

else

begin

setcolor(kasa[ks,3]);

lineto(kasa[ks,0]+kx6,kasa[ks,1]+ky6);

end;

end;

end;



if bitis=hdf_say then

begin

for a:=0 to 63 do

begin

setrgbpalette(yellow,0,a,a);

SETCOLOR(yellow);

outtextxy(150,60,'TEBRiKLER BiR SONRAKi LEVER e GE€EBiLiRSiNiZ');

end;

a:=0; randomize;

repeat

inc(a);

sound(random(1000)*5); delay(1000); nosound;

until (keypressed) or (a=150);

TUS:=#13;

end;

mousegoster;

end;

{ KASALARIN ADIMINA G™RE PUAN ALINMASI }

procedure puan;

begin

kasa_oynat;

setfillstyle(1,BLACK);

bar(10,100,85,160);

bar(10,200,85,280);



pencere(100,75,600,480);

pencere(1,75,95,175);

setcolor(yellow); settextstyle(2,0,4);

outtextxy(25,85, ' ideal ');

outtextxy(12,100,' Adim Sayisi');

setcolor(white); settextstyle(2,0,20);

str(eniyi_tasima,deg);

outtextxy(30,120,deg);



pencere(1,190,95,290);

setcolor(yellow); settextstyle(2,0,4);

outtextxy(27,200,' Sizin ');

outtextxy(05,215,' Adim Sayiniz ');



str(sizin_tasima,deg);

setcolor(white); settextstyle(2,0,20);

outtextxy(30,230,deg);

settextstyle(0,0,0);



pencere(1,305,95,430);

setcolor(yellow); settextstyle(2,0,4);

outtextxy(10,325, 'Hareket > ');

outtextxy(20,340, ' Y”n Tuslari ');

outtextxy(10,360,'Geri > END ');

outtextxy(10,380,'Lever > ENTER ');

outtextxy(10,400,'€ikis > ESC ');





settextstyle(0,0,0);



pencere(100,75,600,480);

pencere(605,75,640,480);

SETCOLOR(yellow);

SETTEXTSTYLE(1,0,1);

outtextxy(616,90, 'T');

outtextxy(615,140,'A');

outtextxy(615,190,'N');

outtextxy(615,240,'S');

outtextxy(617,290,'A');

outtextxy(615,340,'L');

outtextxy(617,390,'I');

outtextxy(615,440,'€');



SETTEXTSTYLE(2,0,4);

setcolor(11); outtextxy(7,465,'Kadir Göksu');

SETTEXTSTYLE(0,0,0);

end;







{ /////////////// programin baslangici \\\\\\\\\\\\\\\\\\\\\\\ }



begin



clrscr;

lever_ata:=15;

if not(mouseinit) then

begin

writeln('mouseinit yok');

halt;

end;

{Grafik Moda ge‡}

grafik;

mousegoster;

getmousecoords(m_x,m_y,m_button);

mousesakla;

setfillstyle(1,BLACK); bar(1,1,640,480);

mousegoster;

acilis:=true;

tekrar_basla:

oyun_aktif:=false;

lever_ata:=15;

mo_x:=m_x;

mo_y:=m_y;

mo_button:=m_button;



{ butonlarin ekrana cizilmesi }

butonlari_dose;



{baslangictaki boxworld yazisinin yazilmasi}



if acilis=true then

begin

acilis:=false;

mousesakla;

setfillstyle(1,yellow);

for A1:=0 to 9 do

for A2:=0 to 7 do

begin



if iB[a1,a2]=1 then bar(50+a2*05 ,200+a1*05,55+a2*05 ,205+a1*05);

if iO[a1,a2]=1 then bar(120+a2*05,200+a1*05,125+a2*05,205+a1*05);

if iX[a1,a2]=1 then bar(190+a2*05,200+a1*05,195+a2*05,205+a1*05);

if iW[a1,a2]=1 then bar(260+a2*05,200+a1*05,265+a2*05,205+a1*05);

if iO2[a1,a2]=1 then bar(330+a2*05,200+a1*05,335+a2*05,205+a1*05);

if iR[a1,a2]=1 then bar(400+a2*05,200+a1*05,405+a2*05,205+a1*05);

if iL[a1,a2]=1 then bar(470+a2*05,200+a1*05,475+a2*05,205+a1*05);

if iD[a1,a2]=1 then bar(540+a2*05,200+a1*05,545+a2*05,205+a1*05);



end;

pencere(30,180,600,275);

mousegoster;

end;



repeat



getmousecoords(m_x,m_y,m_button);



if (mo_x<>m_x) or (mo_y<>m_y) or (mo_button<>m_button) then

begin

mo_x:=m_x; mo_y:=m_y; mo_button:=m_button;

end;

{ BUTON YARI AKTIF IKEN UZERINDEN CIKILDIGINDA PASIF OLMASI }

if mo_button=0 then

begin

if ((mo_x>2) and (mo_x<636) and (mo_y>2) and (mo_y<6)) or

((mo_x>2) and (mo_x<4) and (mo_y>2) and (mo_y<53)) or

((mo_x>2) and (mo_x<636) and (mo_y>47) and (mo_y<53)) or

((mo_x>632) and (mo_x<636) and (mo_y>2) and (mo_y<53)) then



begin

btn1:=false; btn2:=false;btn3:=false;btn4:=false;btn5:=false;

btn6:=false; btn7:=false;btn8:=false;btn9:=false;btn10:=false;

lever_ata:=15; butonlari_yari_aktifyap; butonlari_dose;

end;



if (mo_x>4) and (mo_x<66)and (mo_y>6) and (mo_y<48) then

begin lever_ata:=0;

if btn1=false then

begin

butonlari_dose;

butonlari_yari_aktifyap;

end;

btn1:=true; btn2:=false;btn3:=false;btn4:=false;btn5:=false;

btn6:=false; btn7:=false;btn8:=false;btn9:=false;btn10:=false;

end;

{ BUTONLARIN KOSE KORDINATLARI }

if (mo_x>67) and (mo_x<128)and (mo_y>6) and (mo_y<48) then

begin lever_ata:=1;

if btn2=false then

begin

butonlari_dose;

butonlari_yari_aktifyap;

end;

btn1:=false; btn2:=true;btn3:=false;btn4:=false;btn5:=false;

btn6:=false; btn7:=false;btn8:=false;btn9:=false;btn10:=false;

end;

if (mo_x>130) and (mo_x<192) and (mo_y>6) and (mo_y<48) then

begin lever_ata:=2;

if btn3=false then

begin

butonlari_yari_aktifyap;

butonlari_dose;

end;

btn1:=false; btn2:=false;btn3:=true;btn4:=false;btn5:=false;

btn6:=false; btn7:=false;btn8:=false;btn9:=false;btn10:=false;

end;



if (mo_x>193) and (mo_x<255)and (mo_y>6) and (mo_y<48) then

begin lever_ata:=3;

if btn4=false then

begin

butonlari_yari_aktifyap;

butonlari_dose;

end;

btn1:=false; btn2:=false;btn3:=false;btn4:=true;btn5:=false;

btn6:=false; btn7:=false;btn8:=false;btn9:=false;btn10:=false;

end;



if (mo_x>256) and (mo_x<318)and (mo_y>6) and (mo_y<48) then

begin lever_ata:=4;

if btn5=false then

begin

butonlari_yari_aktifyap;

butonlari_dose;

end;

btn1:=false; btn2:=false;btn3:=false;btn4:=false;btn5:=true;

btn6:=false; btn7:=false;btn8:=false;btn9:=false;btn10:=false;

end;



if (mo_x>319) and (mo_x<381)and (mo_y>6) and (mo_y<48) then

begin lever_ata:=5;

if btn6=false then

begin

butonlari_yari_aktifyap;

butonlari_dose;

end;

btn1:=false; btn2:=false;btn3:=false;btn4:=false;btn5:=false;

btn6:=true; btn7:=false;btn8:=false;btn9:=false;btn10:=false;

end;



if (mo_x>382) and (mo_x<444)and (mo_y>6) and (mo_y<48) then

begin lever_ata:=6;

if btn7=false then

begin

butonlari_yari_aktifyap;

butonlari_dose;

end;

btn1:=false; btn2:=false;btn3:=false;btn4:=false;btn5:=false;

btn6:=false; btn7:=true;btn8:=false;btn9:=false;btn10:=false;

end;



if (mo_x>445) and (mo_x<507)and (mo_y>6) and (mo_y<48) then

begin lever_ata:=7;

if btn8=false then

begin

butonlari_yari_aktifyap;

butonlari_dose;

end;

btn1:=false; btn2:=false;btn3:=false;btn4:=false;btn5:=false;

btn6:=false; btn7:=false;btn8:=true;btn9:=false;btn10:=false;

end;
stromper isimli üyemiz çevrimdışıdır. (Offline)  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Alıntı ile Cevapla
Cevapla

Konu Seçenekleri

Yetkileriniz
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is Açık
Smileler Açık
[IMG] Kodları Açık
HTML-KodlarıKapalı
Trackbacks are Açık
Pingbacks are Açık
Refbacks are Açık
Gitmek istediğiniz klasörü seçiniz


Şu an saat 02:34 .
Tarih 08-30-2008


Powered by vBulletin Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd
Türkçe Çeviri : ach

eXTReMe Tracker


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192