Snake game in js