jsbasic/samples/sample.scribble.txt
2012-02-08 22:13:44 -05:00

25 lines
704 B
Plaintext

10 HOME:VTAB21:HTAB16:?"SCRIBBLE"
14 M=200
15 HGR:DIM OX(M),OY(M):I=0:J=1-M
20 OX(I)=140:OY(I)=80:X=OX(I):Y=OY(I):SX=0:SY=0
30 C=1+3*RND(1):IF RND(1)<0.5 THEN C=C+4
31 HCOLOR=C
33 HPLOT OX(I),OY(I) TO X,Y
35 SX=SX+1-2*RND(1):SY=SY+1-2*RND(1)
36 IF SX < 0 AND X<70 THEN SX=SX*X/50
37 IF SX > 0 AND X>210 THEN SX=SX*(279-X)/50
38 IF SY < 0 AND Y<40 THEN SY=SY*Y/30
39 IF SY > 0 AND Y>120 THEN SY=SY*(159-Y)/30
41 J=J+1:IF J>M THEN J=0
42 I=I+1:IF I>M THEN I=0
43 IF J<0 THEN 45
44 HCOLOR=0:HPLOT OX(I),OY(I) TO OX(J),OY(J):HCOLOR=3
45 OX(I)=X:OY(I)=Y
46 X=X+SX:Y=Y+SY
50 IF X>=0 THEN 70
60 X=0:GOTO 80
70 IF X>=280 THEN X=279
80 IF Y>=0 THEN 100
90 IF Y>=160 THEN Y=159
100 GOTO 30