refactor player-pk with if