コード例 #1
0
 private void gameProcess()
 {
     deck  = new TDeck();
     table = new TCard[5];
     preflop();
     flop();
     river();
 }
コード例 #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;
 }
コード例 #3
0
 public TGame()
 {
     firstInitialization();
     while (true)
     {
         console("Раздача №:" + distribution);
         deck = deck.shuffle();
         deck.printDeck();
         getBlindes(nBlind);
         preflop();
         console(player.getCards());
         break;
     }
 }
コード例 #4
0
ファイル: TDeck.cs プロジェクト: grayDzxcv/Poker
        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);
        }