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);
}
}