Moved code into snake.js
Fixed fruit spawning in negative coordinates bug