Data update

This commit is contained in:
Ingy döt Net 2026-04-30 12:34:36 -04:00
parent 4bb20c9b71
commit cbaf4c4b64
12390 changed files with 318560 additions and 27248 deletions

View file

@ -0,0 +1,30 @@
' Langton's ant
CONST W = 100, H = 100
DIM X AS INTEGER, Y AS INTEGER, Dir AS INTEGER
' Set 320x200 graphic video mode
SCREEN 1
' Start in the middle, facing East
X = W \ 2
Y = H \ 2
Dir = 0
DO
IF POINT(X, Y) <> 0 THEN
Dir = Dir - 1
PSET (X, Y), 0
ELSE
Dir = Dir + 1
PSET (X, Y), 3
END IF
SELECT CASE (Dir MOD 4)
CASE 0
X = X + 1
CASE 1
Y = Y + 1
CASE 2
X = X - 1
CASE 3
Y = Y - 1
END SELECT
LOOP WHILE X >= 0 AND X < W AND Y >= 0 AND Y < H
END