private DrawPile generateInitialDrawPile(PlayPile pp)
     deck = new Deck(NUMBER_OF_DECKS);
     DrawPile dp = new DrawPile(deck.getDeck(), pp);
     return dp;
 public PlayFieldModel(Guid previousPlayFieldModelGuidP, Guid thisInstanceGuid, List<PlayerModel> playerModelsP, List<Card> topCardsPlayPileP, Guid guidOfPlayerWhosTurnItIsP,
     List<Guid> playersAffectedByActionCardGuidsP, TurnActionModel lastActionP, TurnActionModel nextActionP, DrawPile currentDrawPileState, PlayPile currentPlayPileState, int numberOfTurnsRemainingForPlayerP, bool startOfATurnP, Statephase phaseP, Deck deckP)
     //The guid of this instance of PlayFieldModel
     thisPlayFieldModelInstanceGuid = thisInstanceGuid;
     //The Players
     playerModels = playerModelsP;
     //The last 4 played cards
     topCardsOnPlaypile = topCardsPlayPileP;
     //The guid of the player whos turn it currently is
     guidOfPlayerWhosTurnItIs = guidOfPlayerWhosTurnItIsP;
     //A list of players who are affected by an action card that have just been played
     playersAffectedByActionCardGuids = playersAffectedByActionCardGuidsP;
     //The TurnActionModel of the last action
     lastActionPlayed = lastActionP;
     //The current State of the deck
     drawPile = currentDrawPileState;
     //The current State of the playpile
     playpile = currentPlayPileState;
     //The maximun number of cards that the player whos turn it is can play before their turn is over
     numberOfTurnsRemainingForPlayerWhosTurnItIs = numberOfTurnsRemainingForPlayerP;
     //This is the first move of a turn so the player whose turn it is should draw two cards
     startOfATurn = startOfATurnP;
     currentTurnActionModel = nextActionP;
     lastActionPlayed = lastActionP;
     //Current Phase
     currentPhase = phaseP;
     //Previous PlayFieldModelGuid
     previousPlayFieldModelGuid = previousPlayFieldModelGuidP;
     deck = deckP;
 private void dealPlayersInitialFiveCards(List<PlayerModel> players, DrawPile drawPile)
     //PreCondition drawPile is Full and each player.hand contains no Cards
     //PostCondition each player.hand contains 5 Cards
     int numberOfCardsDrawn = 0;
     int forloop = 0;
     for (int i = 0; i < 5; i++)
         foreach (PlayerModel player in players)
             Card drawnCard = drawPile.drawcard();
Beispiel #4
 private DrawPile setUpDrawPile(Deck deck, PlayPile playPile)
     drawPile = new DrawPile(deck.getDeck(), playPile);
     return drawPile;