↑ 1 |
↓ 2 |
↑ 3 |
↓ 4 |
↓ 5 |
↓ 6 |
↑ 7 |
↑ 8 |
0 1 2 3 4 5 6 7 8
12345678901234567890123456789012345678901234567890123456789012345678901234567890
--------------------------------------------------------------------------------
1 DATA "68427153","344322234345432123",254,9,104: READ g$,d$,q,w,h: DIM r(10,9)
2 DATA 0,0,2,0,2,2,0,2,-2,2,-2,0,-2,-2,0,-2,2,-2: LET l=q: LET c=w: LET i=l*l+c
3 PAPER 0: INK 4: CLS: RESTORE 2: LET o=c-INT (c/2)*2: PLOT h,15: FOR z=1 TO 9
4 GO SUB 10: RANDOMIZE e: FOR u=1 TO 9: LET r(z,u)=INT (RND*9): NEXT u: READ v,b
5 LET r(10,z)=r(1,z)>5 OR r(z,z+4-(8 AND z>5))>5 OR w<1 OR w>=q*2 OR q>254
6 LET p=8*(NOT z-INT (z/2)*2 OR o): IF l<2 THEN PRINT "escaped oktogonia!": STOP
7 DRAW v*p,b*p: DRAW INK 4 AND r(10,z);v*p,b*p: DRAW v*p,b*p: NEXT z: PRINT l
8 PAUSE 0: LET k=ABS CODE INKEY$-48: IF k<1+(4 AND NOT o) OR k>8 THEN GO TO 8
9 LET z=CODE g$(k)-47: GO SUB 10: GO TO 2+(6 AND r(10,z)): REM © oktogonia.com
10 LET q=(l+CODE d$(z)-51): LET w=(c+CODE d$(z+9)-51): LET e=q*q+w: RETURN
code © victor@oktogonia.com. License cc-by-nc-nd.