Fixed Obstacle.js and add state of game