Snake game written in Javascript