From 68efd663b7c9c1b7adbaf0433256f6ad287375d5 Mon Sep 17 00:00:00 2001 From: Augustin AFFOGNON Date: Thu, 6 Oct 2022 08:36:05 +0000 Subject: [PATCH] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'Sources/BowlingLib?= =?UTF-8?q?/Model/Equipe.cs'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Sources/BowlingLib/Model/Equipe.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Sources/BowlingLib/Model/Equipe.cs b/Sources/BowlingLib/Model/Equipe.cs index 75d0ded..613bf6f 100644 --- a/Sources/BowlingLib/Model/Equipe.cs +++ b/Sources/BowlingLib/Model/Equipe.cs @@ -71,10 +71,13 @@ namespace BowlingLib.Model // Fonction permettant de vérifier si un joueur existe déjà dans la liste (l'équipe) public bool isExist(Joueur nouvJoueur) { - foreach(Joueur j in Joueurs) + if(Joueurs.Count > 0 ){ + foreach(Joueur j in Joueurs) { if (nouvJoueur.Equals(j)) return true; } + } + return false; }