home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 26
/
CD_ASCQ_26_1295.iso
/
vrac
/
shwtxt19.zip
/
LANDMINE.ST
< prev
next >
Wrap
Text File
|
1995-08-03
|
2KB
|
28 lines
'LANDMINE.ST - LandMines Game
if `[m?] then cls\!"Mouse required."\x
copy(landmine,0)\copy(0,2)\right mouse enter
:new\csr off\nochk\copy(2,0)\gs scr\:new1\copy(2,1)\bfill1(4,3,20,37)attr127
for %i=1 to 10\:rnd\%r=3+2*[rnd1to8]\%c=2+4*[rnd1to8]\if [as:1:%r:%c]=15 rnd
poke1(%r,%c)15 112\next\for %r=5 to 19 step 2\for %c=6 to 34 step 4\%m=0
if [as:1:%r:%c]=15 nxtc\for %y=%r-2 to %r+2 step 2\for %x=%c-4 to %c+4 step 4
if [as:1:%y:%x]<>15 nxtx\%m++\if %m>3 new1\:nxtx\next %x\next %y\%a=32\%b=127
select case %m\case 1\%a=49\%b=122\case 2\%a=50\%b=126\case 3\%a=51\%b=116
end select\poke1(%r,%c)%a %b\:nxtc\next %c\next %r\c@12,20\csr\chk
:k\chk\csr\wk\if key esc x\if[.25:51:25:60]new\if[.25:63:25:68]x\%r=[.r]\%c=[.c]
if [b:0:%r:%c]<>3 k\while [b:0:%r:%c-1]=3\%c--\wend\%c++\%a=[as:1:%r:%c]
bcopy1to0(%r,%c-1,%r,%c+1)\if [k]<>13 lb\if %a<>15 lose\gt k
:lb\if %a=15 lose\if %a<>32 ck
nochk\for %i=1 to 16\for %r=5 to 19 step 2\for %c=6 to 34 step 4
if [as:0:%r:%c]=32 & [at:0:%r:%c]=127 then bcopy1to0(%r-2,%c-5,%r+2,%c+5)
next\next\next\:ck\nochk\for %r=5 to 19 step 2\for %c=6 to 34 step 4
if [b:0:%r:%c]=3 & [as:1:%r:%c]<>15 k\next\next\chk
:win \%won ++\attr174\p@25,42\!"You WIN !!";\gt play
:lose\%lost++\attr174\p@25,42\!"You LOSE !";
:play\gs scr\csr\nochk\for %r=5 to 19 step 2\for %c=6 to 34 step 4
if [as:1:%r:%c]=15 then bcopy1to0(%r,%c-1,%r,%c+1)\endif\next\next\chk
bmod0(25,41,25,80),112,80\p@25,52
attr47\!" - Play Again ? ";\attr52\!" Yes ";\attr47\!" ";\attr52\!" No ";
:agn\wk\if[k]=27|[.25:74:25:77]x\if[.25:68:25:72]new\gt agn
:x\xc\:scr\p-\p@24,19\!%won,3q\p@24,25\!%lost,3q\p+\ret