made the main window close when the game ends and show the high score board