home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 26
/
CD_ASCQ_26_1295.iso
/
vrac
/
shwtxt19.zip
/
BRICKS.ST
< prev
next >
Wrap
Text File
|
1995-08-16
|
1KB
|
34 lines
'BRICKS.ST - Bricks Game
cls\if`[m?] then !"Mouse required."\x\:quit\xc
copy(bricks,1)\bcopy1to0(1,61,25,80)\on intkey0 esc goto quit
:n\bfill1(1,1,3,60)attr[rnd10to15]\bcopy1to0(1,1,25,60)\csrlim(25,1,25,55)\%bl=3
%br=30\:n0\window(12,23,15,37)103,31
p-\p@13,25\!"Click mouse"\p@14,26\!"to start."
+pt0.k\gs bl\:n1\gs m\wk0,n1\bfill0(12,23,15,37)32 7\%y=4\%yd=1\%x=[rnd3to57]
%xd=[rnd0to1]\bmod0(23,65,24,68)127
:p\while [t0]<1\gs m\wend\gs m\.t0\poke0(%y,%x)32 7
if %xd then %x++\%x++ else %x--\%x--
if %x=0 then %x=1\%xd=1
if %x>60 then %x=60\%xd=0
if %yd then %y++ else %y--
if %y=0 then %y=1\%yd=1\%xd=[rnd0to1]
%a=[as:0:%y:%x] \ if %y=25 & %a=32 miss
if (%y=24 & [as:0:%y+1:%x]<>32) | (%y=25 & %a<>32) then _
%yd=0\%xd=[rnd0to1]\poke0(%y,%x)15 15\goto p
if %a=32 then poke0(%y,%x)15 15\gt p
%z=%x-((%x-1)~6)\bfill0(%y,%z,%y,%z+5)32 7\%xd=[rnd0to1]\%yd=1
%br--\if %br=0 win\gt p\:miss\%bl--\gs bl\if %bl=0 lose\gt n0
:m\bfill2(25,1,25,60)32 7\%c=[c.]\bfill2(25,%c,25,%c+5)223 15
bcopy2to0(25,1,25,60)\ret
:bl\%c1=69\for %i=1 to 3\if %i<=%bl then %b=15 else %b=32
poke0(20,%c1)ascii %b\%c1=%c1+2\next\ret
:win \%sy=23\gs sc\bmod0(23,65,23,68),128\gt n
:lose\%sy=24\gs sc\bmod0(24,65,24,68),128\gt n
:sc\nochk\%z=74\:s1\%q=[as:0:%sy:%z]\select case %q
case57\%q1=79\case49to56\%q1=%q+1\case else\%q1=49\end select
poke0(%sy,%z)ascii%q1\chk\if %q1<>79 then ret else %z--\gt s1