Example #1
0
 private Duel(string id, Duelist firstDuelist, Duelist secondDuelist, Turn turn)
 {
     this.id            = id;
     this.firstDuelist  = firstDuelist;
     this.secondDuelist = secondDuelist;
     this.turn          = turn;
 }
Example #2
0
        public static Duel Start(string id, string firstDuelistId, string secondDuelistId)
        {
            var firstDuelist  = Duelist.Create(firstDuelistId, Deck.Create());
            var secondDuelist = Duelist.Create(secondDuelistId, Deck.Create());
            var duel          = new Duel(id, firstDuelist, secondDuelist, null);

            duel.DomainEvents.Add(
                new DuelStarted(id,
                                DuelistState.From(firstDuelist),
                                DuelistState.From(secondDuelist)));
            return(duel);
        }