checkpattern.cpp

来自「A suite of casino games」· C++ 代码 · 共 100 行

CPP
100
字号
#include "poker.h"void CPoker::checkPatterns(){    checkRoyalFlush();    if(isComputerRoyalFlush == true)    {        isComputerStay = true;        isComputerHit = false;	return;    }    checkStraightFlush();    if(isComputerStraightFlush == true)    {	isComputerStay = true;	isComputerHit = false;        return;    }    checkFourOfAKind();    if(isComputerFourOfAKind == true)    {	isComputerStay = true;	isComputerHit = false;        return;    }    checkFullHouse();    if(isComputerFullHouse == true)    {	isComputerStay = true;	isComputerHit = false;        return;    }    checkFlush();    if(isComputerFlush == true)    {	isComputerStay = true;        isComputerHit = false;        return;    }    checkStraight();    if(isComputerStraight == true)    {	isComputerStay = true;	isComputerHit = false;        return;    }    checkThreeOfAKind();    if(isComputerThreeOfAKind == true)    {        return;    }    checkTwoPair();    if(isComputerTwoPair == true)    {        return;    }    checkOnePair();    if(isComputerOnePair == true)    {        return;    }    //else    isComputerRoyalFlush = false;    isComputerStraightFlush = false;    isComputerFourOfAKind = false;    isComputerFullHouse = false;    isComputerFlush = false;    isComputerStraight = false;    isComputerThreeOfAKind = false;    isComputerTwoPair = false;    isComputerOnePair = false;    isComputerNoHand = true;    if(isHumanRoyalFlush == false && isHumanStraightFlush == false    && isHumanFourOfAKind == false && isHumanFullHouse == false    && isHumanFlush == false && isHumanStraight == false    && isHumanThreeOfAKind == false && isHumanTwoPair == false    && isHumanOnePair == false)    {    	isHumanRoyalFlush = false;    	isHumanStraightFlush = false;    	isHumanFourOfAKind = false; 	isHumanFullHouse = false;    	isHumanFlush = false;    	isHumanStraight = false;    	isHumanThreeOfAKind = false;    	isHumanTwoPair = false;    	isHumanOnePair = false;    	isHumanNoHand = true;    }}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?