Implement the alertdialog for finish of game