open window 800,600
backcolor 0,50,150
clear window
clear screen
dim YATAY(20)
dim DIKEY(20)
for a = 0 to 19
YATAY(a)=int(1+(ran(7)))*100+50
DIKEY(a)=int(1+(ran(5)))*100+50
next a
yatay=50
dikey=50
color 255,0,255
text 200,300,"Mayın Tarlası","swiss50"
color 200,100,0
text 120,400,"Mayınları aşarak evine ulaş","modern30"
sleep 3
clear window
repeat
gosub Zemin
gosub Mayin
gosub Hedef
gosub Yon
until(yatay>750 and dikey>550)
label Mayin
for a = 0 to 19
if (yatay=750 and dikey=550) goto Kazan
if (YATAY(a)=yatay and DIKEY(a)=dikey) goto Patla
color 100,100,100
for mine = 0 to 6
line mine+YATAY(a)-35,DIKEY(a)-15, mine+YATAY(a)+23,DIKEY(a)+20
line mine+YATAY(a)-3,DIKEY(a)-35, mine+YATAY(a)-3,DIKEY(a)+35
line mine+YATAY(a)-25,DIKEY(a)+25, mine+YATAY(a)+26,DIKEY(a)-20
next mine
color 50,50,50
fill circle YATAY(a),DIKEY(a),30
next a
return
label Zemin
for x = 50 to 750 step 100
for y = 50 to 550 step 100
Top(x,y)
next y
next x
return
label Yon
A$=inkey$(2)
if (yatay>750) yatay=750
if (yatay<50) yatay=50
if (dikey>550) dikey=550
if (dikey<50) dikey=50
if A$ = "right" then
yatay=yatay+100
elsif A$ = "left" then
yatay=yatay-100
elsif A$ = "up" then
dikey=dikey-100
elsif A$ = "down" then
dikey=dikey+100
else
dikey=dikey
yatay=yatay
endif
return
sub Top(x,y)
if (x=yatay and y=dikey) then
renk1=0
renk2=255
renk3=0
else
renk1=255
renk2=255
renk3=0
endif
color renk1,renk2,renk3
fill circle x,y,50
color 0,0,0
circle x,y,50
end sub
label Hedef
color 255,65,0
fill circle 750,550,50
color 255,0,0
fill triangle 750,520, 780,540, 720,540
color 200,200,0
fill rectangle 725,540, 775,570
color 0,200,200
fill rectangle 730,550, 735,560
fill rectangle 765,550, 770,560
color 0,0,200
fill rectangle 745,550, 755,570
return
label Patla
for P = 0 to 100 step 3
color 255,P,0
circle YATAY(a),DIKEY(a),P
sleep 0.001
next P
for P = 0 to 100 step 3
color 100+P,P,0
circle YATAY(a),DIKEY(a),P
sleep 0.001
next P
for P = 0 to 100 step 3
color 255,0,P
circle YATAY(a),DIKEY(a),P
sleep 0.001
next P
goto SON
label Kazan
clear window
color 0,255,0
text 260,300,"KAZANDIN","modern50"
sleep 4
label SON
clear window
color 255,0,0
text 240,300,"OYUN BİTTİ","swiss50"
A$=inkey$
exit