Esempio n. 1
0
        // Конвертирует короткую запись карманных пар в полный
        // перечень комбинаций данной карманной пары
        private void ConvertPocketPairs(Card[] combos)
        {
            Combo temp = new Combo();

            for (int i = 0; i < combos.Length - 1; i++)
            {
                for (int j = i + 1; j < combos.Length; j++, _combosCounter++)
                {
                    temp = new Combo();
                    temp.CreateCombo(combos[i], combos[j]);
                    _convertedRange[_combosCounter] = temp;

                }
            }
        }
Esempio n. 2
0
        // Конвертирует короткую запись не парного покета в полный
        // перечень комбинаций данной карманной пары
        private void ConvertUnpaired(Card[] firstCardArray, Card[] secondCardArray)
        {
            Combo temp = new Combo();

            for (int i = 0; i < firstCardArray.Length; i++)
            {
                for (int j = 0; j < secondCardArray.Length; j++, _combosCounter++)
                {
                    temp = new Combo();
                    temp.CreateCombo(firstCardArray[i], secondCardArray[j]);
                    _convertedRange[_combosCounter] = temp;
                }
            }
        }
Esempio n. 3
0
        public bool CheckHeroAction(Card[] holeCards)
        {
            Combo temp = new Combo();

            bool comboFromRange = false;

            for (int i = 0; i < _combosCounter; i++)
            {
                temp = new Combo();
                temp = _convertedRange[i];
                comboFromRange = temp.CompareCombos(holeCards);

                if (comboFromRange == true)
                {
                    return comboFromRange;
                }
            }

            return comboFromRange;
        }
Esempio n. 4
0
        private void ConvertUnsuitedHand(Card[] firstCardArray, Card[] secondCardArray)
        {
            Combo temp = new Combo();

            for (int i = 0; i < firstCardArray.Length; i++)
            {
                for (int j = 0; j < secondCardArray.Length; j++)
                {
                    if (secondCardArray[j].CardSuit != firstCardArray[i].CardSuit)
                    {
                        temp = new Combo();
                        temp.CreateCombo(firstCardArray[i], secondCardArray[j]);
                        _convertedRange[_combosCounter] = temp;
                        _combosCounter++;
                    }
                }
            }
        }