Model class representing a PuzzleStorm day record. It stores an Id string and stats (Combo, Errors, Highest, Moves, Runs, Score, Time) and exposes a Date property that parses the Id as "year/month/day" to produce a DateTime.
#nullable enable annotations
namespace LichessNET.Entities.Puzzle.PuzzleStorm;
public class StormDay
{
public string Id { get; set; }
public DateTime Date
{
get
{
return new DateTime(
int.Parse(Id.Split('/')[0]),
int.Parse(Id.Split('/')[1]),
int.Parse(Id.Split('/')[2])
);
}
}
public int Combo { get; set; }
public int Errors { get; set; }
public int Highest { get; set; }
public int Moves { get; set; }
public int Runs { get; set; }
public int Score { get; set; }
public int Time { get; set; }
}