added js game logic and style