Пример #1
0
        private static void playFourcardAndAcesUp(FourCardPoker fourCard, FourCardPoker acesUp, CardDeck deck)
        {
            // new give
            deck.Shuffle();

            for (int i = 0; i < NUMBER_OF_PLAYERS; i++)
            {
                Hand playerHand = new Hand(deck.GetCards(FIVE_CARD_POKER));
                playerHand = FourCardPoker.SortAndRankHandForFourCard(playerHand);
                fourCardPlayers[i].SetHand(playerHand);
                acesUpPlayers[i].SetHand(playerHand);
            }

            Hand dealerHand = new Hand(deck.GetCards(FOUR_CARD_DEALER_HAND));

            dealerHand = FourCardPoker.SortAndRankHandForFourCard(dealerHand);

            fourCard.SetHand(dealerHand);
            acesUp.SetHand(dealerHand);

            CardDeck acesUpDeck = deck.Clone();

            for (int i = 0; i < NUMBER_OF_PLAYERS; i++)
            {
                fourCard.Play(fourCardPlayers[i], deck);
                acesUp.Play(acesUpPlayers[i], acesUpDeck);
            }
        }
Пример #2
0
        private static void playCaribbeanAndOasis(CaribbeanStudPoker caribbean, OasisPoker oasis, CardDeck deck)
        {
            // new give
            deck.Shuffle();

            for (int i = 0; i < NUMBER_OF_PLAYERS; i++)
            {
                Hand playerHand = new Hand(deck.GetCards(FIVE_CARD_POKER));
                playerHand = Pokergame.SortAndRankHand(playerHand);

                caribbeanPlayers[i].SetHand(playerHand);
                oasisPlayers[i].SetHand(playerHand);
            }

            Hand dealerHand = new Hand(deck.GetCards(FIVE_CARD_POKER));

            dealerHand = Pokergame.SortAndRankHand(dealerHand);

            caribbean.SetHand(dealerHand);
            oasis.SetHand(dealerHand);

            caribbean.SkipQualification(false);
            oasis.SkipQualification(false);

            CardDeck oasisDeck = deck.Clone();

            for (int i = 0; i < NUMBER_OF_PLAYERS; i++)
            {
                caribbean.Play(caribbeanPlayers[i]);
                oasis.Play(oasisPlayers[i], oasisDeck);
            }
        }