A downloadable project

Category: "SCHAU"

Name:     "Ants On Bridges"

Made for: TRS-80 Color Computer (or Tandy Color Computer)

*** Description ***

Four bridges are drawn.  The bridges overlap each other.  Then, four ants appear.  Each ant moves over a different bridge.  And they'll crawl under another bridge in the process.

*** Instructions ***

To start the program, put the disk in Drive 0.  Then, enter in this command:

RUN"ANTS"

The demo will run - and will continue to run - until a key is pressed.


1 PMODE0:PCLS:CLEAR256:A$=STRING$(14,0):Q=PEEK(186)*256:J=0:K=0:DIMV(4,5),C(4,14),D(9):D(1)=1:D(2)=6:E=70:F=151:X=313:Y=356:FORT=1TO5:POKEQ+E,1:POKEQ+F,2:POKEQ+X,3:POKEQ+Y,4:E=E+32:F=F+1:X=X+32:Y=Y+1:NEXT:FORE=1TO6:READD(E):NEXT
2 FORX=1TO4:READA$:E=1:FORY=1TO7:C(X,Y)=D(1+VAL(MID$(A$,E,1))):C(X,Y+7)=D(1+VAL(MID$(A$,E+1,1))):E=E+2:NEXTY,X:FORX=1TO4:V(X,1)=0:READE:V(X,2)=E:V(X,3)=E:FORY=4TO5:READV(X,Y):NEXTY,X:D(1)=1:D(2)=6:Y=503:X=4
3 A$=CHR$(191):A$=CHR$(197)+A$+A$+A$+CHR$(202):CLS3:FORT=1TO16:Z=D(2+(X<64ORX>223)):PRINT@X,MID$(A$,Z,5);:PRINT@Y,MID$(A$,Z,5);:X=X+32:Y=Y-32:NEXT:MID$(A$,1,1)=CHR$(195):MID$(A$,5,1)=CHR$(204):X=64:Y=319:FORT=1TO32:E=X:F=Y
4 Z=-(X<87ORX>91):FORG=1TO5:PRINT@E,MID$(A$,G,Z);:PRINT@F,MID$(A$,G,Z);:E=E+32:F=F+32:NEXT:X=X+1:Y=Y-1:NEXT:D(1)=-2:FORE=2TO9:D(E)=0:NEXT:FORZ=-1TO0:N=RND(4):F=V(N,1)+1:D(3)=-V(N,5):X=V(N,2):T=(X<>V(N,4)ANDF=5):F=F+D(2+T)
5 X=X+D(2-T):Y=X+V(N,5):V(N,1)=F:V(N,2)=X:D(4)=PEEK(X+Q):D(5)=C(N,F):D(6)=PEEK(Y+Q):D(7)=C(N,F+7):J=D(5+(D(4)=N)):K=D(7+(D(6)=N)):PRINT@X,CHR$(J);:PRINT@Y,CHR$(K);:IFF=6THENV(N,1)=0:V(N,2)=V(N,3)
6 Z=(INKEY$=""):NEXT:CLS:END:RUN
7 DATA 191,179,186,188,181,176,"030531501000","040542502000","010513503000","020524504000",454,006,032, 129,159,-01, 057,505,-32, 382,352,001


Download

Download
Ants.dsk 157 kB
Download
Ants.txt 503 bytes
Download
Listing.txt 1.2 kB

Leave a comment

Log in with itch.io to leave a comment.