From a98bc52be007431b5437706a90a47fa0f275af01 Mon Sep 17 00:00:00 2001 From: Dominic Masters Date: Tue, 18 Jan 2022 21:55:00 -0800 Subject: [PATCH] Still working on testing --- src/poker/poker.c | 2 ++ src/poker/poker.h | 13 ++++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/poker/poker.c b/src/poker/poker.c index 902cdab..09d2f35 100644 --- a/src/poker/poker.c +++ b/src/poker/poker.c @@ -189,7 +189,9 @@ void pokerAi(uint8_t player, pokerturn_t *turn) { } else { // Simulate my hand being the winning hand, use that as the confidence // TODO: Repurpose old code lmao. Just take it from Dawn-C + BGB_printf("Holy shit you guys"); pokerWinnerGetForPlayer(player, &winning); + BGB_printf("Winning type %u", winning.type); confidence = pokerWinnerGetTypeConfidence(winning.type); } diff --git a/src/poker/poker.h b/src/poker/poker.h index 438bc1f..5708eaf 100644 --- a/src/poker/poker.h +++ b/src/poker/poker.h @@ -43,4 +43,15 @@ inline bool pokerDoesPlayerNeedToBet(uint8_t playerIndex); inline uint8_t pokerGetRemainingBetterCount(); void pokerWinnerFillRemaining(pokerplayerwinning_t *winning); void pokerWinnerGetForPlayer(uint8_t playerIndex,pokerplayerwinning_t *winning); -inline uint16_t pokerWinnerGetTypeConfidence(uint8_t type); \ No newline at end of file +inline uint16_t pokerWinnerGetTypeConfidence(uint8_t type); +uint8_t pokerWinnerCompare( + pokerplayerwinning_t *left, pokerplayerwinning_t *right +); +void pokerWinnerDetermineForPot( + pokerpot_t *pot, + pokerplayerwinning_t *winners, + uint8_t *winnerPlayers, + uint8_t *winnerCount, + uint8_t *participants, + uint8_t *participantCount +); \ No newline at end of file