Exemplo n.º 1
0
 public Game(string id, string name, IEnumerable <Player> players, Player currentPlayer, QuestionsDeck questionDeck)
 {
     Id   = id;
     Name = name;
     _players.AddRange(players);
     CurrentPlayer = currentPlayer;
     QuestionDeck  = questionDeck;
 }
Exemplo n.º 2
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));
        }