Snake game implementation, Javascript, Firebase