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

  1. 'TOWERS.ST - Towers Game
  2. if`[m?] then cls\!"Mouse required."\x\:quit\xc
  3. copy(towers,2)\%t=7\on intkey0 esc goto quit\:s\csrlim\csr\gosub drw
  4. :k\csrlim\:k0\csr\wk\%r=[.r]\%c=[.c]\%b=[b:0:%r:%c]\if key esc quit
  5. if %r>16 k1\if %b<>7 k\while [b:0:%r:%c-1]=7\%c--\wend\%c++
  6. %t=[as:0:%r:%c]-48\goto s\:k1\if %b=0 k \ gs mc
  7. if [b:0:%r-1:%c]>0 k\csroff\csrlim(16,13,16,67)
  8. bcopy0to0(%r,%c-12,%r,%c+12)(16,%c-12)\bfill0(%r,%c-12,%r,%c+12)32 15
  9. poke0(%r,%c)186 15\bcopy0to1(16,%c-12,16,%c+12)(1,1)
  10. :m\%c1=[c.]\bfill1(16,1,16,80)32 15\bcopy1to1(1,1,1,25)(16,%c1-12)
  11. bcopy1to0(16,1,16,80)\wk0\if key null m\%c=%c1\gs mc
  12. for %r=17 to 25\%b1=[b:0:%r:%c]\if %b1=0 then gonext
  13. if %b<%b1 then goto md else goto m
  14. next\:md\bcopy1to0(1,1,1,25)(%r-1,%c-12)\bfill0(16,1,16,80)32 15
  15. if [as:0:24:13]<>186 | [as:0:24:67]<>186 k 
  16. :f\attr158\p@15,11\!" YOU DID IT !! ";
  17. attr30\!"- Select Number of Disks or ESCape to Exit "\csrlim(12,31,12,49)\gt k0
  18. :mc\for %i=0 to 25\%c1=%c-%i\%c2=%c+%i\if [as:0:25:%c1]=202 then %c=%c1
  19. if [as:0:25:%c2]=202 then %c=%c2\endif\next\ret
  20. :drw\bfill1(1,1,25,80)32 15\bfill1(17,13,25,13)186 15\bfill1(25,1,25,25)205 15
  21. poke1(25,13)202 15\bcopy1to1(17,1,25,25)(17,28)\bcopy1to1(17,1,25,25)(17,55)
  22. for %i=1 to %t\%r=(24-%t+%i)\if %i=1 then %w=1 else %w=(%i-1)*2
  23. bfill1(%r,13-%w,%r,13+%w)32 %i*16+15\next\copy(2,0)\bcopy1to0(17,1,25,80)\ret
  24.