private void FillScoreItem(ScoreItem scoreItem, ScoreItemDto scoreItemDto) { scoreItem.Name = scoreItemDto.Name; scoreItem.Score = scoreItemDto.Score; scoreItem.Date = scoreItemDto.Date; scoreItem.Duration = scoreItemDto.Duration; scoreItem.Result = scoreItemDto.Result; }
private void AddGameInfo() { var gameDuration = _finishTime - _startTime; var scoreItem = new ScoreItemDto { Name = GameSessionData.Instance.UserName, Score = GameSessionData.Instance.Score.ToString(), Date = DateTime.Today.ToShortDateString(), Duration = gameDuration.ToString(), Result = _escapeType.ToString() }; GameCommonData.Instance.Scores.AddFirst(scoreItem); }