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

  1. 'LANDMINE.ST - LandMines Game
  2. if `[m?] then cls\!"Mouse required."\x
  3. copy(landmine,0)\copy(0,2)\right mouse enter
  4. :new\csr off\nochk\copy(2,0)\gs scr\:new1\copy(2,1)\bfill1(4,3,20,37)attr127
  5. for %i=1 to 10\:rnd\%r=3+2*[rnd1to8]\%c=2+4*[rnd1to8]\if [as:1:%r:%c]=15 rnd
  6. poke1(%r,%c)15 112\next\for %r=5 to 19 step 2\for %c=6 to 34 step 4\%m=0
  7. 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
  8. if [as:1:%y:%x]<>15 nxtx\%m++\if %m>3 new1\:nxtx\next %x\next %y\%a=32\%b=127
  9. select case %m\case 1\%a=49\%b=122\case 2\%a=50\%b=126\case 3\%a=51\%b=116
  10. end select\poke1(%r,%c)%a %b\:nxtc\next %c\next %r\c@12,20\csr\chk
  11. :k\chk\csr\wk\if key esc x\if[.25:51:25:60]new\if[.25:63:25:68]x\%r=[.r]\%c=[.c]
  12. if [b:0:%r:%c]<>3 k\while [b:0:%r:%c-1]=3\%c--\wend\%c++\%a=[as:1:%r:%c]
  13. bcopy1to0(%r,%c-1,%r,%c+1)\if [k]<>13 lb\if %a<>15 lose\gt k
  14. :lb\if %a=15 lose\if %a<>32 ck
  15. nochk\for %i=1 to 16\for %r=5 to 19 step 2\for %c=6 to 34 step 4
  16. if [as:0:%r:%c]=32 & [at:0:%r:%c]=127 then bcopy1to0(%r-2,%c-5,%r+2,%c+5)
  17. next\next\next\:ck\nochk\for %r=5 to 19 step 2\for %c=6 to 34 step 4
  18. if [b:0:%r:%c]=3 & [as:1:%r:%c]<>15 k\next\next\chk
  19. :win \%won ++\attr174\p@25,42\!"You WIN !!";\gt play
  20. :lose\%lost++\attr174\p@25,42\!"You LOSE !";
  21. :play\gs scr\csr\nochk\for %r=5 to 19 step 2\for %c=6 to 34 step 4
  22. if [as:1:%r:%c]=15 then bcopy1to0(%r,%c-1,%r,%c+1)\endif\next\next\chk
  23. bmod0(25,41,25,80),112,80\p@25,52
  24. attr47\!" - Play Again ? ";\attr52\!" Yes ";\attr47\!" ";\attr52\!" No "; 
  25. :agn\wk\if[k]=27|[.25:74:25:77]x\if[.25:68:25:72]new\gt agn 
  26. :x\xc\:scr\p-\p@24,19\!%won,3q\p@24,25\!%lost,3q\p+\ret
  27.  
  28.