/// <summary> /// Initializes a new instance of the <see cref="Stats"/> class. /// </summary> /// <param name="id">The id<see cref="Identity"/></param> /// <param name="points">The points<see cref="int"/></param> /// <param name="lines">The lines<see cref="int"/></param> /// <param name="level">The level<see cref="int"/></param> /// <param name="speed">The speed<see cref="int"/></param> /// <param name="moves">The moves<see cref="int"/></param> /// <param name="blocks">The blocks<see cref="int"/></param> /// <param name="duration">The duration<see cref="long"/></param> private Stats(StatsRecord record) : this(record.Id) { Score = record.Score; Lines = record.Lines; Level = record.Level; Speed = record.Speed; Moves = record.Moves; Blocks = record.Blocks; _durationHistory.Add(DateTime.Now, record.Seconds); }
/// <summary> /// Carrega uma estatística baseada num registro de estatística salvo anteriormente. /// </summary> /// <param name="record"></param> /// <returns></returns> public static Stats Load(StatsRecord record) { return(new Stats(record)); }