updated snake.js functions to draw background