StartingDeck() public method

public StartingDeck ( int playerIndex ) : IEnumerable
playerIndex int
return IEnumerable
Exemplo n.º 1
0
 private void GainStartingCards(GameConfig gameConfig)
 {
     foreach (PlayerState player in this.players.AllPlayers)
     {
         foreach (CardCountPair pair in gameConfig.StartingDeck(player.PlayerIndex))
         {
             if (pair.Card.isShelter)
             {
                 player.GainCard(this, pair.Card, DeckPlacement.GameStart);
             }
             else
             {
                 player.GainCardsFromSupply(this, pair.Card, pair.Count);
             }
         }
     }
 }
Exemplo n.º 2
0
 private void GainStartingCards(GameConfig gameConfig)
 {
     for (int playerIndex = 0; playerIndex < this.players.PlayerCount; ++playerIndex)
     {
         PlayerState player = this.players[playerIndex];
         foreach (CardCountPair pair in gameConfig.StartingDeck(playerIndex))
         {
             if (pair.Card.isShelter)
             {
                 player.GainCard(this, pair.Card, DeckPlacement.Supply);
             }
             else
             {
                 player.GainCardsFromSupply(this, pair.Card, pair.Count);
             }
         }
     }
 }
Exemplo n.º 3
0
 private void GainStartingCards(GameConfig gameConfig)
 {
     foreach (PlayerState player in this.players.AllPlayers)
     {
         foreach (CardCountPair pair in gameConfig.StartingDeck(player.PlayerIndex))
         {
             if (pair.Card.isShelter)
             {
                 player.GainCard(this, pair.Card, DeckPlacement.GameStart);
             }
             else
             {
                 player.GainCardsFromSupply(this, pair.Card, pair.Count);
             }
         }
     }
 }