home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
17 Bit Software 1: Collection A
/
17Bit_Collection_A.iso
/
files
/
37.dms
/
37.adf
/
qix.bas
< prev
next >
Wrap
BASIC Source File
|
1988-05-22
|
977b
|
42 lines
1 scnclr
6 c=1
7 nc=0
8 input "tail length";tl
9 scnclr
10 x = 24 : y = 50
11 xx=24 : yy=50
20 z = 24 : k = 100
21 zz=24 : kk=100
30 dx = 3 : dy = 3
31 ex=3 : ey=3
40 dz = 5 : dk = 5
41 ez=5 : ek=5
42 pena 1 : paint (10,10)
50 c=c+1 : pena c
51 draw (x,y to z,k)
52 gosub 5000
60 x = x + dx
70 z = z + dz
80 if x < 4 or x > 320 then dx = - dx
90 if z < 4 or z > 320 then dz = - dz
100 y = y + dy
110 k = k + dk
120 if y < 5 or y > 200 then dy = - dy
130 if k < 5 or k > 200 then dk = -dk
131 if c = 31 then c = 1
140 get a$ : if a$ = chr$ (13) then 1000
150 goto 50
1000 end
5000 cc=1 : pena cc
5001 nc=nc+1 : if nc < tl then return
5050 draw (xx,yy to zz,kk)
5060 xx=xx+ex
5070 zz=zz+ez
5080 if xx < 4 or xx> 320 then ex=-ex
5090 if zz < 4 or zz> 320 then ez=-ez
5100 yy=yy+ey
5110 kk=kk+ek
5120 if yy < 5 or yy > 200 then ey=-ey
5130 if kk < 5 or kk > 200 then ek=-ek
5140 return