finalized the game logic and improved the playing interface