logic for player end