diff --git a/Sources/BowlingLib/Model/Frame.cs b/Sources/BowlingLib/Model/Frame.cs
index c262279..351e33a 100644
--- a/Sources/BowlingLib/Model/Frame.cs
+++ b/Sources/BowlingLib/Model/Frame.cs
@@ -11,7 +11,7 @@ namespace BowlingLib.Model
///
/// Classe Model Frame
///
- public class Frame:IEquatable
+ public class Frame:IEquatable
{
const int MAX_QUILLE = 10;
public int Numero
diff --git a/Sources/BowlingLib/Model/Joueur.cs b/Sources/BowlingLib/Model/Joueur.cs
index 5e43d07..e3975d7 100644
--- a/Sources/BowlingLib/Model/Joueur.cs
+++ b/Sources/BowlingLib/Model/Joueur.cs
@@ -85,6 +85,8 @@ namespace BowlingLib.Model
public void AddPartie(Partie p)
{
+ if(Parties.Contains(p))
+ throw new ArgumentException("la partie existe deja");
parties.Add(p);
}
diff --git a/Sources/BowlingLib/Model/Partie.cs b/Sources/BowlingLib/Model/Partie.cs
index 42e46df..30c1bec 100644
--- a/Sources/BowlingLib/Model/Partie.cs
+++ b/Sources/BowlingLib/Model/Partie.cs
@@ -67,6 +67,8 @@ namespace BowlingLib.Model
///
public void AddFrame(Frame frame)
{
+ if (Frames.Contains(frame))
+ throw new ArgumentException("Le frame existe déjà");
frames.Add(frame);
}