Set up confidence levels.
This commit is contained in:
@ -28,7 +28,38 @@ pokerturn_t pokerTurnGet(poker_t *poker, uint8_t playerIndex) {
|
||||
|
||||
// Now let's determine the "base confidence". This is basically how good the
|
||||
// hand is relative to a completely equal footing/player field.
|
||||
confidence = winning.type->weight;
|
||||
switch(winning.type) {
|
||||
case POKER_WINNING_TYPE_ROYAL_FLUSH:
|
||||
confidence = POKER_TURN_CONFIDENCE_ROYAL_FLUSH;
|
||||
break;
|
||||
case POKER_WINNING_TYPE_STRAIGHT_FLUSH:
|
||||
confidence = POKER_TURN_CONFIDENCE_STRAIGHT_FLUSH;
|
||||
break;
|
||||
case POKER_WINNING_TYPE_FOUR_OF_A_KIND:
|
||||
confidence = POKER_TURN_CONFIDENCE_FOUR_OF_A_KIND;
|
||||
break;
|
||||
case POKER_WINNING_TYPE_FULL_HOUSE:
|
||||
confidence = POKER_TURN_CONFIDENCE_FULL_HOUSE;
|
||||
break;
|
||||
case POKER_WINNING_TYPE_FLUSH:
|
||||
confidence = POKER_TURN_CONFIDENCE_FLUSH;
|
||||
break;
|
||||
case POKER_WINNING_TYPE_STRAIGHT:
|
||||
confidence = POKER_TURN_CONFIDENCE_STRAIGHT;
|
||||
break;
|
||||
case POKER_WINNING_TYPE_THREE_OF_A_KIND:
|
||||
confidence = POKER_TURN_CONFIDENCE_THREE_OF_A_KIND;
|
||||
break;
|
||||
case POKER_WINNING_TYPE_TWO_PAIR:
|
||||
confidence = POKER_TURN_CONFIDENCE_TWO_PAIR;
|
||||
break;
|
||||
case POKER_WINNING_TYPE_PAIR:
|
||||
confidence = POKER_TURN_CONFIDENCE_PAIR;
|
||||
break;
|
||||
default:
|
||||
confidence = POKER_TURN_CONFIDENCE_HIGH_CARD;
|
||||
break;
|
||||
}
|
||||
|
||||
// Now we have a base confidence, let's figure out how good our hand is based
|
||||
// on our high card. This will decide whether or not our hand is as strong as
|
||||
|
Reference in New Issue
Block a user