Compare commits

...

15 Commits

Author SHA1 Message Date
Mamadou Elaphi ARAFA 66f8b15a63 Transférer les fichiers vers 'Documentation/doc_images'
continuous-integration/drone/push Build is passing Details
3 years ago
victor perez ngounou e498d16b47 Merge branch 'master' of https://codefirst.iut.uca.fr/git/victor_perez.ngounou/BowlingScoreApp
continuous-integration/drone/push Build is passing Details
3 years ago
victor perez ngounou fb2f4d1d71 Done
3 years ago
victor perez ngounou ba6a3cb784 Done
continuous-integration/drone/push Build is passing Details
3 years ago
victor perez ngounou 08e536d6da Merge branch 'master' of https://codefirst.iut.uca.fr/git/victor_perez.ngounou/BowlingScoreApp
continuous-integration/drone/push Build is failing Details
3 years ago
victor perez ngounou 03cbcdb149 Done
3 years ago
victor perez ngounou d42752c396 Revert "Done"
3 years ago
victor perez ngounou 1c4d77aed6 Done
3 years ago
Victor Perez NGOUNOU 3618f792a0 Merge pull request '.' (#71) from BowlingConsoleApp into master
continuous-integration/drone/push Build is passing Details
3 years ago
Victor Perez NGOUNOU 0734f42db5 Merge pull request 'BowlingConsoleApp' (#70) from BowlingConsoleApp into master
continuous-integration/drone/push Build is passing Details
3 years ago
victor perez ngounou e7062da7a9 .
continuous-integration/drone/push Build is passing Details
3 years ago
Augustin AFFOGNON b8966afb1c Mise à jour EF
continuous-integration/drone/push Build is passing Details
3 years ago
Augustin AFFOGNON 3869121b82 Mise à jour de 'README.md'
continuous-integration/drone/push Build is passing Details
3 years ago
Victor Perez NGOUNOU 7fc95593da Mise à jour de 'README.md'
continuous-integration/drone/push Build is passing Details
3 years ago
Victor Perez NGOUNOU 25c7e85e9d Mise à jour de 'README.md'
continuous-integration/drone/push Build is passing Details
3 years ago

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

@ -44,7 +44,7 @@ l'application vas permettre de:
### Clone
Clone this repo to your local machine using `https://codefirst.iut.uca.fr/victor_perez.ngounou/BowlingScoreApp.git`
Clone this repo to your local machine using `https://codefirst.iut.uca.fr/git/victor_perez.ngounou/BowlingScoreApp.git`
* [Git](https://git-scm.com) - Download and Install Git.
* [Visual Studio](https://visualstudio.microsoft.com/fr/) - Download and Install Visual Studio.
@ -79,7 +79,7 @@ $ dotnet ef database update
## Contributeurs
* [Victor Perez NGOUNOU](https://codefirst.iut.uca.fr/victor_perez.ngounou)
* [Victor Perez NGOUNOU](https://codefirst.iut.uca.fr/git/victor_perez.ngounou)
* [Mamadou Elaphi ARAFA](https://codefirst.iut.uca.fr/git/mamadou_elaphi.arafa)
* [Augustin AFFOGNON](https://codefirst.iut.uca.fr/git/augustin.affognon)
@ -88,7 +88,7 @@ $ dotnet ef database update
Contactez-moi à l'un des endroits suivants !
* Website at <a href="https://codefirst.iut.uca.fr/victor_perez.ngounou" target="_blank">`https://codefirst.iut.uca.fr/victor_perez.ngounou`</a>
* Website at <a href="https://codefirst.iut.uca.fr/git/victor_perez.ngounou" target="_blank">`https://codefirst.iut.uca.fr/git/victor_perez.ngounou`</a>
* Email at <a href="mailto:victor_perez.ngounou@etu.uca.fr" target="_blank">`victor_perez.ngounou@etu.uca.fr`</a>
## License

@ -11,7 +11,7 @@ namespace BowlingLib.Model
/// <summary>
/// Classe Model Equipe
/// </summary>
public class Equipe
public class Equipe:IEquatable<Equipe>
{
#region Propiéters
public string Nom { get; private set; }
@ -53,13 +53,7 @@ namespace BowlingLib.Model
public IEnumerable<Joueur> AjouterJoueurs(params Joueur[] joueurs)
{
List<Joueur> result = new();
foreach (var a in joueurs)
{
if (AjouterJoueur(a))
{
result.Add(a);
}
}
result.AddRange(joueurs.Where(a => AjouterJoueur(a)));
return result;
@ -93,12 +87,7 @@ namespace BowlingLib.Model
{
joueurs.Remove(joueur);
}
/// <summary>
/// retourner la liste non modifiable des joueurs de l'équipe
/// </summary>
/// <returns></returns>
/// <summary>
/// Fonction permettant de vérifier si un joueur existe déjà dans la liste (l'équipe)
@ -111,6 +100,23 @@ namespace BowlingLib.Model
return true;
return false;
}
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 Equipe);
}
public override int GetHashCode()
{
return joueurs.GetHashCode();
}
public bool Equals(Equipe other)
{
return joueurs.Equals(other.joueurs);
}
#endregion
}

@ -11,7 +11,7 @@ namespace BowlingLib.Model
/// <summary>
/// Classe Model Frame
/// </summary>
public class Frame
public class Frame:IEquatable<Frame>
{
const int MAX_QUILLE = 10;
public int Numero
@ -285,5 +285,23 @@ namespace BowlingLib.Model
this.IsFinished = true;
}
}
public bool Equals(Frame other)
{
return Numero.Equals(other.Numero);
}
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 Frame);
}
public override int GetHashCode()
{
return Numero.GetHashCode();
}
}
}

@ -5,6 +5,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Collections.ObjectModel;
using System.Diagnostics;
namespace BowlingLib.Model
{
@ -84,9 +85,16 @@ namespace BowlingLib.Model
public void AddPartie(Partie p)
{
if(Parties.Contains(p))
throw new ArgumentException("la partie existe deja");
parties.Add(p);
}
private string GetDebuggerDisplay()
{
return ToString();
}
#endregion
}
}

@ -10,7 +10,7 @@ namespace BowlingLib.Model
/// <summary>
/// Classe Model Partie
/// </summary>
public class Partie
public class Partie:IEquatable<Partie>
{
#region Propriétés
public ReadOnlyCollection<Frame> Frames { get; }
@ -67,6 +67,8 @@ namespace BowlingLib.Model
/// <param name="frame"></param>
public void AddFrame(Frame frame)
{
if (Frames.Contains(frame))
throw new ArgumentException("Le frame existe déjà");
frames.Add(frame);
}
@ -96,6 +98,23 @@ namespace BowlingLib.Model
}
return score;
}
public bool Equals(Partie other)
{
return Joueur.Equals(Joueur) && Date.Equals(other.Date);
}
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 Partie);
}
public override int GetHashCode()
{
return Joueur.GetHashCode();
}
#endregion
}
}

Loading…
Cancel
Save