public IModificateurJoueur ObtenirModificateurDeJoueur(int licenseDuJoueurAModifier) { if (!repertoireJoueurs.Existe(licenseDuJoueurAModifier)) { throw new ElementNonExistantException(); } return(new ModificateurJoueur(this.repertoireJoueurs, licenseDuJoueurAModifier)); }
public Joueur Creer() { if (license == -1) { throw new ArgumentNullException("Il faut specifier la license du joueur"); } if (numeroClub == null) { throw new ArgumentNullException("Il faut specifier le club auquel appartient le joueur"); } else if (!repertoireClubs.Existe(numeroClub)) { throw new ElementNonExistantException(); } else if (repertoireJoueurs.Existe(license)) { throw new DuplicationException(); } var joueur = new Joueur(license, numeroClub, champsPoona); repertoireJoueurs.Ajouter(joueur); return(joueur); }