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 >
BASIC Source File  |  1988-05-22  |  977b  |  42 lines

  1. 1     scnclr
  2. 6     c=1
  3. 7     nc=0
  4. 8     input "tail length";tl
  5. 9     scnclr
  6. 10    x = 24 : y = 50
  7. 11    xx=24 : yy=50
  8. 20    z = 24 : k = 100
  9. 21    zz=24 : kk=100
  10. 30    dx = 3 : dy = 3
  11. 31    ex=3 : ey=3
  12. 40    dz = 5 : dk = 5
  13. 41    ez=5 : ek=5
  14. 42    pena 1 : paint (10,10)
  15. 50    c=c+1 : pena c
  16. 51    draw (x,y to z,k)
  17. 52    gosub 5000
  18. 60    x = x + dx
  19. 70    z = z + dz
  20. 80    if x < 4 or x > 320 then dx = - dx
  21. 90    if z < 4 or z > 320 then dz = - dz
  22. 100   y = y + dy
  23. 110   k = k + dk
  24. 120   if y < 5 or y > 200 then dy = - dy
  25. 130   if k < 5 or k > 200 then dk = -dk
  26. 131   if c = 31 then c = 1
  27. 140   get a$ : if a$ = chr$ (13) then 1000
  28. 150   goto 50
  29. 1000  end
  30. 5000  cc=1 : pena cc
  31. 5001  nc=nc+1 : if nc < tl then return
  32. 5050  draw (xx,yy to zz,kk)
  33. 5060  xx=xx+ex
  34. 5070  zz=zz+ez
  35. 5080  if xx < 4 or xx> 320 then ex=-ex
  36. 5090  if zz < 4 or zz> 320 then ez=-ez
  37. 5100  yy=yy+ey
  38. 5110  kk=kk+ek
  39. 5120  if yy < 5 or yy > 200 then ey=-ey
  40. 5130  if kk < 5 or kk > 200 then ek=-ek
  41. 5140  return
  42.