Author Topic: Ants  (Read 1145 times)

0 Members and 1 Guest are viewing this topic.

Offline bikemadness

  • Amiga 1200
  • ****
  • Posts: 312
  • Karma: 25
  • Hard players don't go home.
    • View Profile
Ants
« on: June 01, 2025 »
Yes. The creepy crawlies.
Don't show this to your girlfriend.

Code: [Select]
open window 640,512
setrgb 0,255,255,255
fill rectangle 0,0 to 640,512
l=5
fly=100
dim flyx(fly),flyy(fly)
dim a(fly),k(fly),e(fly),c(fly),f(fly),d(fly)
for m=1 to fly
flyx(m)=int(ran(640))
flyy(m)=int(ran(512))
next m
repeat
setdrawbuf dw
dw=1-dw
setdispbuf dw
clear window
for m=1 to fly
setrgb 1,0,0,0
k(m)=a(m)
label move
a(m)=int(ran(36))
if (a(m)>k(m)-34 and a(m)<k(m)-2) goto move
if (a(m)>k(m)+2 and a(m)<k(m)+34) goto move
e(m)=c(m)
f(m)=d(m)
if ((e(m)+320)>640) e(m)=-320
if ((e(m)+320)<0) e(m)=320
if ((f(m)+256)>512) f(m)=-256
if ((f(m)+256)<0) f(m)=256
c(m)=(cos(10*(pi/180)*a(m))*l)+e(m)
d(m)=(sin(10*(pi/180)*a(m))*l)+f(m)
fill circle flyx+e(m)+320,flyy+f(m)+256,3
fill circle flyx+c(m)+320,flyy+d(m)+256,3
next m
until (1=0)

Have a Yahappy day.
I don't know what is wrong with the world - but I know how to fix it.