Infrastructure for Snake - I've left some printlns in so you can see the ordering of what's going on