|
|
@ -1,27 +1,32 @@
|
|
|
|
using System;
|
|
|
|
using QwirkleClassLibrary.Boards;
|
|
|
|
|
|
|
|
using System;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
|
|
using System.Collections.ObjectModel;
|
|
|
|
using System.Linq;
|
|
|
|
using System.Linq;
|
|
|
|
using System.Text;
|
|
|
|
using System.Text;
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
|
|
namespace QwirkleClassLibrary.Players
|
|
|
|
namespace QwirkleClassLibrary.Players
|
|
|
|
{
|
|
|
|
{
|
|
|
|
public struct Score
|
|
|
|
public class Score
|
|
|
|
{
|
|
|
|
{
|
|
|
|
private int PlayerScore { get; set; }
|
|
|
|
public string PlayerName { get; private set; }
|
|
|
|
public string PlayerTag { get; }
|
|
|
|
public DateTime Date { get; set; }
|
|
|
|
|
|
|
|
public int Points { get; set; }
|
|
|
|
|
|
|
|
public int Victories { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
public Score(Player? p)
|
|
|
|
public Score(string playerName, DateTime date, int points, int victories)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (p == null)
|
|
|
|
this.PlayerName = playerName;
|
|
|
|
{
|
|
|
|
this.Date = date;
|
|
|
|
throw new ArgumentNullException(nameof(p), "player cannot be null");
|
|
|
|
this.Points = points;
|
|
|
|
}
|
|
|
|
this.Victories = victories;
|
|
|
|
else
|
|
|
|
}
|
|
|
|
{
|
|
|
|
|
|
|
|
PlayerScore = 0;
|
|
|
|
public override string ToString()
|
|
|
|
PlayerTag = p.NameTag;
|
|
|
|
{
|
|
|
|
}
|
|
|
|
return PlayerName + " Date last game :" + Date.ToString() + " Points :" + Points + " Win : " + Victories;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|