Esempio n. 1
0
 private void gameProcess()
 {
     deck  = new TDeck();
     table = new TCard[5];
     preflop();
     flop();
     river();
 }
Esempio n. 2
0
 private void firstInitialization()
 {
     player       = new TPlayer();
     computer     = new TPlayer();
     computer2    = new TPlayer();
     deck         = new TDeck();
     blind        = 2;
     distribution = 1;
     nBlind       = 0;
     cardNumber   = 0;
 }
Esempio n. 3
0
 public TGame()
 {
     firstInitialization();
     while (true)
     {
         console("Раздача №:" + distribution);
         deck = deck.shuffle();
         deck.printDeck();
         getBlindes(nBlind);
         preflop();
         console(player.getCards());
         break;
     }
 }
Esempio n. 4
0
        public TDeck shuffle()
        {
            TCard[] basicCards   = this.getCards();
            TDeck   shuffledDeck = new TDeck();

            TCard[] shuffledCards = shuffledDeck.getCards();
            Random  rand          = new Random();
            int     counter       = 51;
            int     randRandIndex;

            while (counter >= 0)
            {
                randRandIndex          = rand.Next(counter);
                shuffledCards[counter] = basicCards[randRandIndex];
                basicCards             = delElem(basicCards, randRandIndex);
                counter--;
            }

            shuffledDeck.setCards(shuffledCards);
            return(shuffledDeck);
        }