create check of end game