A simple snake game on canvas implemented in javascript