Working on winner logic

This commit is contained in:
2022-01-18 21:54:49 -08:00
parent 49ec91be42
commit a930eba101

View File

@@ -171,8 +171,26 @@ void conversationQueueFlopTurnRiver() {
}
void conversationQueueWinnerDecide() {
pokerpot_t *pot;
pokerplayerwinning_t winners[POKER_PLAYER_COUNT_MAX];
uint8_t winnerPlayers[POKER_PLAYER_COUNT_MAX];
uint8_t participants[POKER_PLAYER_COUNT_MAX];
uint8_t winnerCount, participantCount;
QUEUE_ITEM = QUEUE_DEBUG;
pot = POKER_POTS + 0;
pokerWinnerDetermineForPot(
pot,
winners,
winnerPlayers,
&winnerCount,
participants,
&participantCount
);
// BGB_printf("Winner count %u", winnerCount);
// BGB_printf("Winner %u", winners[0]);
// TODO: Decide on a winner for real.
conversationTextboxString(DEBUG_WINNER_DECIDED);
@@ -251,7 +269,7 @@ inline void conversationQueueInit() {
inline void conversationQueueNext() {
BGB_printf("Doing %d", QUEUE_ITEM);
if(QUEUE_ITEM >= QUEUE_WINNER_DECIDE) return;
if(QUEUE_ITEM > QUEUE_WINNER_DECIDE) return;
if(QUEUE_CALLBACKS[QUEUE_ITEM] == NULL) return;
QUEUE_CALLBACKS[QUEUE_ITEM]();
}