You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
1.4 KiB
44 lines
1.4 KiB
using QwirkleClassLibrary.Boards;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Collections.ObjectModel;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace QwirkleClassLibrary.Players
|
|
{
|
|
public class Score
|
|
{
|
|
public string PlayerName { get; private set; }
|
|
public DateTime Date { get; set; }
|
|
public int Points { get; set; }
|
|
public int Victories { get; set; }
|
|
|
|
/// <summary>
|
|
/// Creates a score with the player's name, the date of the score, the number of points and the number of victories
|
|
/// </summary>
|
|
/// <param name="playerName"></param>
|
|
/// <param name="date"></param>
|
|
/// <param name="points"></param>
|
|
/// <param name="victories"></param>
|
|
public Score(string playerName, DateTime date, int points, int victories)
|
|
{
|
|
PlayerName = playerName;
|
|
Date = date;
|
|
Points = points;
|
|
Victories = victories;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Overrides the ToString method to display the player's name, the date of the score, the number of points and the number of victories
|
|
/// </summary>
|
|
/// <returns>string</returns>
|
|
public override string ToString()
|
|
{
|
|
return PlayerName + " / " + Date.ToString() + " / " + Points + " / " + Victories;
|
|
}
|
|
}
|
|
|
|
}
|