home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 26
/
CD_ASCQ_26_1295.iso
/
vrac
/
shwtxt19.zip
/
TOWERS.ST
< prev
next >
Wrap
Text File
|
1995-08-31
|
1KB
|
24 lines
'TOWERS.ST - Towers Game
if`[m?] then cls\!"Mouse required."\x\:quit\xc
copy(towers,2)\%t=7\on intkey0 esc goto quit\:s\csrlim\csr\gosub drw
:k\csrlim\:k0\csr\wk\%r=[.r]\%c=[.c]\%b=[b:0:%r:%c]\if key esc quit
if %r>16 k1\if %b<>7 k\while [b:0:%r:%c-1]=7\%c--\wend\%c++
%t=[as:0:%r:%c]-48\goto s\:k1\if %b=0 k \ gs mc
if [b:0:%r-1:%c]>0 k\csroff\csrlim(16,13,16,67)
bcopy0to0(%r,%c-12,%r,%c+12)(16,%c-12)\bfill0(%r,%c-12,%r,%c+12)32 15
poke0(%r,%c)186 15\bcopy0to1(16,%c-12,16,%c+12)(1,1)
:m\%c1=[c.]\bfill1(16,1,16,80)32 15\bcopy1to1(1,1,1,25)(16,%c1-12)
bcopy1to0(16,1,16,80)\wk0\if key null m\%c=%c1\gs mc
for %r=17 to 25\%b1=[b:0:%r:%c]\if %b1=0 then gonext
if %b<%b1 then goto md else goto m
next\:md\bcopy1to0(1,1,1,25)(%r-1,%c-12)\bfill0(16,1,16,80)32 15
if [as:0:24:13]<>186 | [as:0:24:67]<>186 k
:f\attr158\p@15,11\!" YOU DID IT !! ";
attr30\!"- Select Number of Disks or ESCape to Exit "\csrlim(12,31,12,49)\gt k0
:mc\for %i=0 to 25\%c1=%c-%i\%c2=%c+%i\if [as:0:25:%c1]=202 then %c=%c1
if [as:0:25:%c2]=202 then %c=%c2\endif\next\ret
:drw\bfill1(1,1,25,80)32 15\bfill1(17,13,25,13)186 15\bfill1(25,1,25,25)205 15
poke1(25,13)202 15\bcopy1to1(17,1,25,25)(17,28)\bcopy1to1(17,1,25,25)(17,55)
for %i=1 to %t\%r=(24-%t+%i)\if %i=1 then %w=1 else %w=(%i-1)*2
bfill1(%r,13-%w,%r,13+%w)32 %i*16+15\next\copy(2,0)\bcopy1to0(17,1,25,80)\ret