endgame logic in and displays correct screen to player