예제 #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));
        }
예제 #2
0
 public void Apply(GameStarted gameStarted)
 {
     _id            = gameStarted.GameId;
     _questionsDeck = new QuestionsDeck(gameStarted.GameCategories);
 }