Connect the ui with the game.