|
|
@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
using System;
|
|
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
|
|
using System.Data;
|
|
|
|
|
|
|
|
using System.Linq;
|
|
|
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
namespace Models
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
public class BestScore
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public BestScore(int gamesPlayed, int score)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
GamesPlayed = gamesPlayed;
|
|
|
|
|
|
|
|
Score = score;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public int GamesPlayed { get; private set; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private int _score;
|
|
|
|
|
|
|
|
public int Score
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
get
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return _score;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
private set
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (value > _score)
|
|
|
|
|
|
|
|
_score = value;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
public override string ToString()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return $"Ce joueur a joué {GamesPlayed} parties et à pour meilleur score {Score}";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void IncrGamesPlayed()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
GamesPlayed += 1;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|