Exemple #1
0
        public Game Update(GameStatus newStatus, IReadOnlyCollection <PlayEvent> newActions, DateTimeOffset updatedAt)
        {
            var newHistory = History.Concat(newActions).ToList();

            return(new Game(newStatus, newHistory, updatedAt));
        }
Exemple #2
0
 private Game(GameStatus status, IReadOnlyCollection <PlayEvent> history, DateTimeOffset lastUpdated)
 {
     Status      = status;
     History     = history;
     LastUpdated = DateTimeOffset.Now;
 }