예제 #1
0
        private void dealCard(int playerIndex)
        {
            int drawDeckTopCardIndex = drawDeck.topCardIndex();

            BasicCard cardDealing = drawDeck.CardDeck[drawDeckTopCardIndex];

            drawDeck.removeCard(drawDeckTopCardIndex, discardDeck);
            turn.Players[playerIndex].addCardToHand(cardDealing);
        }
예제 #2
0
        public void DrawCard()
        {
            int       nextPlayerIndex = turn.getNextTurnIndex();
            Player    nextPlayer      = turn.Players[nextPlayerIndex];
            int       cardDrawnIndex  = drawDeck.topCardIndex();
            BasicCard cardDrawn       = drawDeck.CardDeck[cardDrawnIndex];

            drawDeck.removeCard(cardDrawnIndex, discardDeck);
            nextPlayer.addCardToHand(cardDrawn);
        }