game of snake built in Javascript