Skip to content

Instantly share code, notes, and snippets.

@JasonSpine
Created September 8, 2018 01:02
Show Gist options
  • Save JasonSpine/a65c3be44dcd76426726afa22d64c557 to your computer and use it in GitHub Desktop.
Save JasonSpine/a65c3be44dcd76426726afa22d64c557 to your computer and use it in GitHub Desktop.
7 Billion Humans | Year 58 | Speed
-- 7 Billion Humans (2087) --
-- 58: Good Neighbors --
mem1 = nearest wall
mem2 = nearest datacube
a:
b:
c:
d:
pickup mem2
mem2 = nearest datacube
if n == wall or
e == wall or
s == wall or
w == wall:
drop
end
endif
step mem1
e:
if w == wall and
s != wall:
f:
if c == datacube:
step s
jump e
endif
drop
mem1 = nearest wall
jump d
endif
g:
if s == wall and
e != wall:
if c == datacube:
step e
jump g
endif
drop
mem1 = nearest wall
jump c
endif
h:
if e == wall and
n != wall:
if c == datacube:
step n
jump h
endif
drop
mem1 = nearest wall
jump b
endif
i:
if n == wall and
w != wall:
if c == datacube:
step w
jump i
endif
drop
mem1 = nearest wall
else:
jump f
endif
jump a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment