📄 checktwopair.cpp
字号:
#include "poker.h"void CPoker::checkTwoPair(){//detecting two pair if(twoCounter == 2) { if((twoCounter == 2 || threeCounter == 2 || fourCounter == 2 || fiveCounter == 2 || sixCounter == 2 || sevenCounter == 2 || eightCounter == 2 || nineCounter == 2 || tenCounter == 2 || jackCounter == 2 || queenCounter == 2 || kingCounter == 2 || aceCounter == 2) && (threeCounter == 2 || fourCounter == 2 || fiveCounter == 2 || sixCounter == 2 || sevenCounter == 2 || eightCounter == 2 || nineCounter == 2 || tenCounter == 2 || nineCounter == 2 || tenCounter == 2 || jackCounter == 2 || queenCounter == 2 || kingCounter == 2 || aceCounter == 2)) { isComputerRoyalFlush = false; isComputerStraightFlush = false; isComputerFourOfAKind = false; isComputerFullHouse = false; isComputerFlush = false; isComputerStraight = false; isComputerThreeOfAKind = false; isComputerTwoPair = true; isComputerOnePair = false; isComputerNoHand = false; } } else if(threeCounter == 2) { if((twoCounter == 2 || threeCounter == 2 || fourCounter == 2 || fiveCounter == 2 || sixCounter == 2 || sevenCounter == 2 || eightCounter == 2 || nineCounter == 2 || tenCounter == 2 || jackCounter == 2 || queenCounter == 2 || kingCounter == 2 || aceCounter == 2) && (twoCounter == 2 || fourCounter == 2 || fiveCounter == 2 || sixCounter == 2 || sevenCounter == 2 || eightCounter == 2 || nineCounter == 2 || tenCounter == 2 || jackCounter == 2 || queenCounter == 2 ||kingCounter == 2 || aceCounter == 2)) { isComputerRoyalFlush = false; isComputerStraightFlush = false; isComputerFourOfAKind = false; isComputerFullHouse = false; isComputerFlush = false; isComputerStraight = false; isComputerThreeOfAKind = false; isComputerTwoPair = true; isComputerOnePair = false; isComputerNoHand = false; } } else if(fourCounter == 2) { if((twoCounter == 2 || threeCounter == 2 || fourCounter == 2 || fiveCounter == 2 || sixCounter == 2 || sevenCounter == 2 || eightCounter == 2 || nineCounter == 2 || tenCounter == 2 || jackCounter == 2 || queenCounter == 2 || kingCounter == 2 || aceCounter == 2) && (twoCounter == 2 || threeCounter == 2 || fiveCounter == 2 || sixCounter == 2 || sevenCounter == 2 || eightCounter == 2 || nineCounter == 2 || tenCounter == 2 || jackCounter == 2 || queenCounter == 2 || kingCounter == 2 || aceCounter == 2)) { isComputerRoyalFlush = false; isComputerStraightFlush = false; isComputerFourOfAKind = false; isComputerFullHouse = false; isComputerFlush = false; isComputerStraight = false; isComputerThreeOfAKind = false; isComputerTwoPair = true; isComputerOnePair = false; isComputerNoHand = false; } } else if(fiveCounter == 2) { if((twoCounter == 2 || threeCounter == 2 || fourCounter == 2 || fiveCounter == 2 || sixCounter == 2 || sevenCounter == 2 || eightCounter == 2 || nineCounter == 2 || tenCounter == 2 || jackCounter == 2 || queenCounter == 2 || kingCounter == 2 || aceCounter == 2) && (twoCounter == 2 || threeCounter == 2 || fourCounter == 2 || sixCounter == 2 || sevenCounter == 2 || eightCounter == 2 || nineCounter == 2 || tenCounter == 2 || jackCounter == 2 || queenCounter == 2 || kingCounter == 2 || aceCounter == 2)) { isComputerRoyalFlush = false; isComputerStraightFlush = false; isComputerFourOfAKind = false; isComputerFullHouse = false; isComputerFlush = false; isComputerStraight = false; isComputerThreeOfAKind = false; isComputerTwoPair = true; isComputerOnePair = false; isComputerNoHand = false; } } else if(sixCounter == 2) { if((twoCounter == 2 || threeCounter == 2 || fourCounter == 2 || fiveCounter == 2 || sixCounter == 2 || sevenCounter == 2 || eightCounter == 2 || nineCounter == 2 || tenCounter == 2 || jackCounter == 2 || queenCounter == 2 || kingCounter == 2 || aceCounter == 2) && (twoCounter == 2 || threeCounter == 2 || fourCounter == 2 || fiveCounter == 2 || sevenCounter == 2 || eightCounter == 2 || nineCounter == 2 || tenCounter == 2 || jackCounter == 2 || queenCounter == 2 || kingCounter == 2 || aceCounter == 2)) { isComputerRoyalFlush = false; isComputerStraightFlush = false; isComputerFourOfAKind = false; isComputerFullHouse = false; isComputerFlush = false; isComputerStraight = false; isComputerThreeOfAKind = false; isComputerTwoPair = true; isComputerOnePair = false; isComputerNoHand = false; } } else if(sevenCounter == 2) { if((twoCounter == 2 || threeCounter == 2 || fourCounter == 2 || fiveCounter == 2 || sixCounter == 2 || sevenCounter == 2 || eightCounter == 2 || nineCounter == 2 || tenCounter == 2 || jackCounter == 2 || queenCounter == 2 || kingCounter == 2 || aceCounter == 2) && (twoCounter == 2 || threeCounter == 2 || fourCounter == 2 || fiveCounter == 2 || sixCounter == 2 || eightCounter == 2 || nineCounter == 2 || tenCounter == 2 || jackCounter == 2 || queenCounter == 2 || kingCounter == 2 || aceCounter == 2)) { isComputerRoyalFlush = false; isComputerStraightFlush = false; isComputerFourOfAKind = false; isComputerFullHouse = false; isComputerFlush = false; isComputerStraight = false; isComputerThreeOfAKind = false; isComputerTwoPair = true; isComputerOnePair = false; isComputerNoHand = false; } } else if(eightCounter == 2) { if((twoCounter == 2 || threeCounter == 2 || fourCounter == 2 || fiveCounter == 2 || sixCounter == 2 || sevenCounter == 2 || eightCounter == 2 || nineCounter == 2 || tenCounter == 2 || jackCounter == 2 || queenCounter == 2 || kingCounter == 2 || aceCounter == 2) && (twoCounter == 2 || threeCounter == 2 || fourCounter == 2 || fiveCounter == 2 || sixCounter == 2 || sevenCounter == 2 || nineCounter == 2 || tenCounter == 2 || jackCounter == 2 || queenCounter == 2 || kingCounter == 2 || aceCounter == 2)) { isComputerRoyalFlush = false; isComputerStraightFlush = false; isComputerFourOfAKind = false; isComputerFullHouse = false; isComputerFlush = false; isComputerStraight = false; isComputerThreeOfAKind = false; isComputerTwoPair = true; isComputerOnePair = false; isComputerNoHand = false; } } else if(nineCounter == 2) { if((twoCounter == 2 || threeCounter == 2 || fourCounter == 2 || fiveCounter == 2 || sixCounter == 2 || sevenCounter == 2 || eightCounter == 2 || nineCounter == 2 || tenCounter == 2 || jackCounter == 2 || queenCounter == 2 || kingCounter == 2 || aceCounter == 2) && (twoCounter == 2 || threeCounter == 2 || fourCounter == 2 || fiveCounter == 2 || sixCounter == 2 || sevenCounter == 2 || eightCounter == 2 || tenCounter == 2 || jackCounter == 2 || queenCounter == 2 || kingCounter == 2 || aceCounter == 2)) { isComputerRoyalFlush = false; isComputerStraightFlush = false; isComputerFourOfAKind = false; isComputerFullHouse = false; isComputerFlush = false; isComputerStraight = false; isComputerThreeOfAKind = false; isComputerTwoPair = true; isComputerOnePair = false; isComputerNoHand = false; } } else if(tenCounter == 2) { if((twoCounter == 2 || threeCounter == 2 || fourCounter == 2 || fiveCounter == 2 || sixCounter == 2 || sevenCounter == 2 || eightCounter == 2 || nineCounter == 2 || tenCounter == 2 || jackCounter == 2 || queenCounter == 2 || kingCounter == 2 || aceCounter == 2) && (twoCounter == 2 || threeCounter == 2 || fourCounter == 2 || fiveCounter == 2 || sixCounter == 2 || sevenCounter == 2 || eightCounter == 2 || nineCounter == 2 || jackCounter == 2 || queenCounter == 2 || kingCounter == 2 || aceCounter == 2)) { isComputerRoyalFlush = false; isComputerStraightFlush = false; isComputerFourOfAKind = false; isComputerFullHouse = false; isComputerFlush = false; isComputerStraight = false; isComputerThreeOfAKind = false; isComputerTwoPair = true; isComputerOnePair = false; isComputerNoHand = false; } } else if(jackCounter == 2) { if((twoCounter == 2 || threeCounter == 2 || fourCounter == 2 || fiveCounter == 2 || sixCounter == 2 || sevenCounter == 2 || eightCounter == 2 || nineCounter == 2 || tenCounter == 2 || jackCounter == 2 || queenCounter == 2 || kingCounter == 2 || aceCounter == 2) && (twoCounter == 2 || threeCounter == 2 || fourCounter == 2 || fiveCounter == 2 || sixCounter == 2 || sevenCounter == 2 || eightCounter == 2 || nineCounter == 2 || tenCounter == 2 || queenCounter == 2 || kingCounter == 2 || aceCounter == 2)) { isComputerRoyalFlush = false; isComputerStraightFlush = false; isComputerFourOfAKind = false; isComputerFullHouse = false; isComputerFlush = false; isComputerStraight = false; isComputerThreeOfAKind = false; isComputerTwoPair = true; isComputerOnePair = false; isComputerNoHand = false; } } else if(queenCounter == 2) { if((twoCounter == 2 || threeCounter == 2 || fourCounter == 2 || fiveCounter == 2 || sixCounter == 2 || sevenCounter == 2 || eightCounter == 2 || nineCounter == 2 || tenCounter == 2 || jackCounter == 2 || queenCounter == 2 || kingCounter == 2 || aceCounter == 2) && (twoCounter == 2 || threeCounter == 2 || fourCounter == 2 || fiveCounter == 2 || sixCounter == 2 || sevenCounter == 2 || eightCounter == 2 || nineCounter == 2 || tenCounter == 2 || jackCounter == 2 || kingCounter == 2 || aceCounter == 2)) { isComputerRoyalFlush = false; isComputerStraightFlush = false; isComputerFourOfAKind = false; isComputerFullHouse = false; isComputerFlush = false; isComputerStraight = false; isComputerThreeOfAKind = false; isComputerTwoPair = true; isComputerOnePair = false; isComputerNoHand = false; } } else if(kingCounter == 2) { if((twoCounter == 2 || threeCounter == 2 || fourCounter == 2 || fiveCounter == 2 || sixCounter == 2 || sevenCounter == 2 || eightCounter == 2 || nineCounter == 2 || tenCounter == 2 || jackCounter == 2 || queenCounter == 2 || kingCounter == 2 || aceCounter == 2) && (twoCounter == 2 || threeCounter == 2 || fourCounter == 2 || fiveCounter == 2 || sixCounter == 2 || sevenCounter == 2 || eightCounter == 2 || nineCounter == 2 || tenCounter == 2 || jackCounter == 2 || queenCounter == 2 || aceCounter == 2)) { isComputerRoyalFlush = false; isComputerStraightFlush = false; isComputerFourOfAKind = false; isComputerFullHouse = false; isComputerFlush = false; isComputerStraight = false; isComputerThreeOfAKind = false; isComputerTwoPair = true; isComputerOnePair = false; isComputerNoHand = false; } } else if(aceCounter == 2) { if((twoCounter == 2 || threeCounter == 2 || fourCounter == 2 || fiveCounter == 2 || sixCounter == 2 || sevenCounter == 2 || eightCounter == 2 || nineCounter == 2 || tenCounter == 2 || jackCounter == 2 || queenCounter == 2 || kingCounter == 2 || aceCounter == 2) && (twoCounter == 2 || threeCounter == 2 || fourCounter == 2 || fiveCounter == 2 || sixCounter == 2 || sevenCounter == 2 || eightCounter == 2 || nineCounter == 2 || tenCounter == 2 || jackCounter == 2 || queenCounter == 2 || kingCounter == 2)) { isComputerRoyalFlush = false; isComputerStraightFlush = false; isComputerFourOfAKind = false; isComputerFullHouse = false; isComputerFlush = false; isComputerStraight = false; isComputerThreeOfAKind = false; isComputerTwoPair = true; isComputerOnePair = false; isComputerNoHand = false; } } if(isHumanRoyalFlush == false && isHumanStraightFlush == false
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -