home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 26 / CD_ASCQ_26_1295.iso / vrac / shwtxt19.zip / BRICKS.ST < prev    next >
Text File  |  1995-08-16  |  1KB  |  34 lines

  1. 'BRICKS.ST - Bricks Game
  2. cls\if`[m?] then !"Mouse required."\x\:quit\xc
  3. copy(bricks,1)\bcopy1to0(1,61,25,80)\on intkey0 esc goto quit
  4.  
  5. :n\bfill1(1,1,3,60)attr[rnd10to15]\bcopy1to0(1,1,25,60)\csrlim(25,1,25,55)\%bl=3
  6. %br=30\:n0\window(12,23,15,37)103,31
  7. p-\p@13,25\!"Click mouse"\p@14,26\!"to start."
  8. +pt0.k\gs bl\:n1\gs m\wk0,n1\bfill0(12,23,15,37)32 7\%y=4\%yd=1\%x=[rnd3to57]
  9. %xd=[rnd0to1]\bmod0(23,65,24,68)127
  10.  
  11. :p\while [t0]<1\gs m\wend\gs m\.t0\poke0(%y,%x)32 7
  12. if %xd then %x++\%x++ else %x--\%x--
  13. if %x=0 then %x=1\%xd=1
  14. if %x>60 then %x=60\%xd=0
  15. if %yd then %y++ else %y--
  16. if %y=0 then %y=1\%yd=1\%xd=[rnd0to1]
  17. %a=[as:0:%y:%x] \ if %y=25 & %a=32 miss
  18. if (%y=24 & [as:0:%y+1:%x]<>32) | (%y=25 & %a<>32) then _
  19.     %yd=0\%xd=[rnd0to1]\poke0(%y,%x)15 15\goto p
  20. if %a=32 then poke0(%y,%x)15 15\gt p
  21. %z=%x-((%x-1)~6)\bfill0(%y,%z,%y,%z+5)32 7\%xd=[rnd0to1]\%yd=1
  22. %br--\if %br=0 win\gt p\:miss\%bl--\gs bl\if %bl=0 lose\gt n0
  23.  
  24. :m\bfill2(25,1,25,60)32 7\%c=[c.]\bfill2(25,%c,25,%c+5)223 15
  25. bcopy2to0(25,1,25,60)\ret
  26. :bl\%c1=69\for %i=1 to 3\if %i<=%bl then %b=15 else %b=32
  27. poke0(20,%c1)ascii %b\%c1=%c1+2\next\ret
  28. :win \%sy=23\gs sc\bmod0(23,65,23,68),128\gt n
  29. :lose\%sy=24\gs sc\bmod0(24,65,24,68),128\gt n
  30. :sc\nochk\%z=74\:s1\%q=[as:0:%sy:%z]\select case %q
  31. case57\%q1=79\case49to56\%q1=%q+1\case else\%q1=49\end select
  32. poke0(%sy,%z)ascii%q1\chk\if %q1<>79 then ret else %z--\gt s1
  33.  
  34.