Line Rider in Javascript