Exemple #1
0
 public GameFactory(
     ICardDeckFactory cardDeckFactory,
     IPlayerFactory playerFactory,
     IActionStepper actionStepper)
 {
     _cardDeckFactory = cardDeckFactory;
     _playerFactory   = playerFactory;
 }
Exemple #2
0
        public Game(
            ICardDeckFactory cardDeckFactory,
            IPlayerFactory playerFactory,
            IActionStepper actionStepper,
            int playerCount)
        {
            CardDeck = cardDeckFactory.CreateDeck(this);

            var players = new List <IPlayer>();

            for (var i = 0; i < playerCount; i++)
            {
                players.Add(playerFactory.Create(this));
            }

            Players = players.ToArray();

            _actionStepper = actionStepper;

            Step();
        }
 public GameFactory(ICardDeckFactory cardDeckFactory)
 {
     _cardDeckFactory = cardDeckFactory;
 }