Added some code to help with the generation of a snake