JS implementation of Flappy Block game