gl: {a: p~?p / not colliding with self? d:: a*(dir;…
gl: {a: p~?p / not colliding with self?
d:: a*(dir;d)@~+/dir / update direction
p:: (-l&1+#p)#p,,20!d+*|p / grow/move snake
b: |/g~/:p / overlapping goal?
g:: (g;2?20)b / respawn goal if needed
...