Skip to content

Instantly share code, notes, and snippets.

@tbrosman
Last active September 10, 2018 03:00
Show Gist options
  • Save tbrosman/8df7c6833d170a70a208caa936a32fee to your computer and use it in GitHub Desktop.
Save tbrosman/8df7c6833d170a70a208caa936a32fee to your computer and use it in GitHub Desktop.
An amusing and inefficient solution for 7 Billion Humans Year 32
-- 7 Billion Humans (2087) --
-- 32: Creative Writhing --
--
-- Causes the humans to write datacubes one column at a time starting with the middle column. Because the humans are not all aligned
-- to the same side of their line at the start, all three humans visit all three columns.
-- column 2, moving south
a:
step s
if s == wall:
jump b
endif
if c == 0:
pickup c
write 99
drop
endif
jump a
b:
step w
-- column 1, moving north
c:
step n
-- This is a really bizarre way to check boundary conditions that works for the far left lane (which ends at a wall) as well as
-- the other lanes.
if w != datacube and
c != datacube and
e != datacube and
ne != datacube:
jump d
endif
if c == 0:
pickup c
write 99
drop
endif
jump c
d:
step e
step e
-- column 3, moving south
e:
step s
if c == 0:
pickup c
write 99
drop
endif
jump e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment