Skip to content

Instantly share code, notes, and snippets.

@colinjfw
Last active September 28, 2019 01:08
Show Gist options
  • Save colinjfw/315635d235bf41c60d6cdad61f34557b to your computer and use it in GitHub Desktop.
Save colinjfw/315635d235bf41c60d6cdad61f34557b to your computer and use it in GitHub Desktop.
def move(state)
head = state[:you][:body][0]
moves = ['up', 'down', 'left', 'right']
moves.each do |move|
coord = move_as_coord(move, head)
# We now know where this is going to be!
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment