Dominion.GameConfig.GetSupplyPiles C# (CSharp) Method

GetSupplyPiles() public method

public GetSupplyPiles ( int numberOfPlayers, Random random ) : Dominion.PileOfCards[]
numberOfPlayers int
random System.Random
return Dominion.PileOfCards[]
        public PileOfCards[] GetSupplyPiles(int numberOfPlayers, Random random)
        {
            return GetPiles(numberOfPlayers, random, isSupply: true);
        }

Usage Example

Beispiel #1
0
        public GameState(
            IPlayerAction[] playerActions,
            int[] playerPositions,
            Game game,
            IEnumerable <CardCountPair>[] startingDeckPerPlayer = null)
        {
            this.game = game;
            GameConfig gameConfig = game.GameConfig;

            int playerCount = playerActions.Length;

            this.supplyPiles    = gameConfig.GetSupplyPiles(playerCount, game.random);
            this.nonSupplyPiles = gameConfig.GetNonSupplyPiles();

            this.mapCardToPile = new MapOfCardsForGameSubset <PileOfCards>(this.CardGameSubset);
            this.BuildMapOfCardToPile();

            this.players = new PlayerCircle(playerCount, playerActions, playerPositions, game);

            this.hasPileEverBeenGained = new MapPileOfCards <bool>(this.supplyPiles);
            this.pileEmbargoTokenCount = new MapPileOfCards <int>(this.supplyPiles);
            this.trash = new BagOfCards(this.CardGameSubset);

            this.GainStartingCards(gameConfig);

            this.players.AllPlayersDrawInitialCards(gameConfig);

            foreach (PileOfCards cardPile in this.supplyPiles)
            {
                cardPile.ProtoTypeCard.DoSpecializedSetupIfInSupply(this);
            }
        }
All Usage Examples Of Dominion.GameConfig::GetSupplyPiles