Пример #1
0
        internal IEnumerable <IDomainEvent> Move(int diceRoll, QuestionsDeck questionsDeck)
        {
            if (IsInPenaltyBox)
            {
                yield return(new GetOutOfPenaltyBox(Id));
            }
            var newPlace = (Place + diceRoll) % 12;

            yield return(new Moved(Id, newPlace));

            yield return(questionsDeck.Draw(newPlace));
        }