some dubiously helpful refactoring that unifies snake's head and body
kill the snake if it hits a wall or itself