diff --git a/Sources/BowlingLib/Model/Joueur.cs b/Sources/BowlingLib/Model/Joueur.cs
index 4413a6e..a34a183 100644
--- a/Sources/BowlingLib/Model/Joueur.cs
+++ b/Sources/BowlingLib/Model/Joueur.cs
@@ -1,57 +1,58 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace BowlingLib.Model
-{
- ///
- /// Classe Model Joueur
- ///
- public class Joueur
- {
- private string pseudo;
- private readonly long id;
- public long Id
- {
- get { return id; }
- }
-
- public Joueur(string pseudo)
- {
- this.Pseudo = pseudo;
- }
-
- public Joueur(long id,string pseudo) : this(pseudo)
- {
- this.id = id;
- }
-
- public string Pseudo
- {
- get { return pseudo; }
- set
- {
-
- pseudo = value;
- if (pseudo == null || pseudo == "" || pseudo.Length < 3)
- {
- throw new ArgumentException("Le pseudo ne peut pas être vide");
- }
- }
- }
-
- public override bool Equals(object obj)
- {
- return obj is Joueur joueur &&
- pseudo == joueur.pseudo &&
- Pseudo == joueur.Pseudo;
- }
-
- public override int GetHashCode()
- {
- return HashCode.Combine(id, Id, Pseudo);
- }
- }
-}
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace BowlingLib.Model
+{
+ ///
+ /// Classe Model Joueur
+ ///
+ public class Joueur IEquatable
+ {
+ private string pseudo;
+ private readonly long id;
+ public long Id
+ {
+ get { return id; }
+ }
+
+ public Joueur(string pseudo)
+ {
+ this.Pseudo = pseudo;
+ }
+
+ public Joueur(long id,string pseudo) : this(pseudo)
+ {
+ this.id = id;
+ }
+
+ public string Pseudo
+ {
+ get { return pseudo; }
+ set
+ {
+
+ pseudo = value;
+ if (string.IsNullOrWhiteSpace(pseudo) || pseudo.Length < 3)
+ {
+ throw new ArgumentException("Le pseudo ne peut pas être vide");
+ }
+ }
+ }
+
+ public override bool Equals(object obj)
+ {
+ if(ReferenceEquals(obj, null)) return false;
+ if(ReferenceEquals(obj, this)) return true;
+ if(GetType() != obj.GetType()) return false;
+ return Equals(obj as Joueur);
+ }
+
+ public override int GetHashCode()
+ {
+ return HashCode.Combine(id, Id, Pseudo);
+ }
+ }
+}