public void GetHand() { SortCards(); if (isRoyalFlush()) { dhand = DHand.ROYALFLUSH; SetHandText(); } else if (isFlush() && isStraight()) { dhand = DHand.STRAIGHTFLUSH; SetHandText(); } else if (isFourOKind()) { dhand = DHand.FOUROFAKIND; SetHandText(); } else if (isFlush()) { dhand = DHand.FLUSH; SetHandText(); } else if (isFullHouse()) //22233 (three of a kind first then the pair) { dhand = DHand.FULLHOUSE; SetHandText(); } else if (isFullHouse2()) //22333 (pair then a three of a kind) { dhand = DHand.FULLHOUSE; SetHandText(); } else if (isStraight()) { dhand = DHand.STRAIGHT; SetHandText(); } else if (isThreeOKind()) { dhand = DHand.THREEOFAKIND; SetHandText(); } else if (is2Pair()) { dhand = DHand.TWOPAIR; SetHandText(); } else if (isPair()) { dhand = DHand.ONEPAIR; SetHandText(); } else //if (samecardcounter == 0 && sametypecounter == 0) { dhand = DHand.HIGHCARD; SetHandText(); } }
// Start is called before the first frame update void Start() { dhand = DHand.DDEFAULT; HighestCard = Cards.CardNum.DEFAULT; }
// Start is called before the first frame update void Start() { groupIter = 0; dhand = DHand.DDEFAULT; HighestCard = Cards.CardNum.DEFAULT; }