Class snake game in canvas.