Even more refactoring
This commit is contained in:
@ -10,7 +10,7 @@
|
||||
#include "card.h"
|
||||
#include "player.h"
|
||||
#include "winner.h"
|
||||
#include "poker.h"
|
||||
#include "dealer.h"
|
||||
|
||||
/** Size of the FULL hand used to calculate a winning. */
|
||||
#define POKER_WINNING_FULL_SIZE POKER_PLAYER_HAND+POKER_DEALER_HAND_SIZE
|
||||
@ -59,24 +59,24 @@ typedef struct {
|
||||
* Returns the full hand for a given player including the best cards on the
|
||||
* bench.
|
||||
*
|
||||
* @param poker Poker game instance.
|
||||
* @param dealer Poker game dealer instance.
|
||||
* @param player Poker player game instance.
|
||||
* @param cards Array of at least 7 length to store the array.
|
||||
*/
|
||||
void pokerWinnerHandGetFull(poker_t *poker, pokerplayer_t *player,
|
||||
card_t *cards
|
||||
void pokerWinnerHandGetFull(
|
||||
pokerdealer_t *dealer, pokerplayer_t *player, card_t *cards
|
||||
);
|
||||
|
||||
/**
|
||||
* Calculates and returns the winning state for a given player
|
||||
*
|
||||
* @param poker Poker game instance.
|
||||
* @param player Player game instance.
|
||||
* @param dealer Poker game dealer instance.
|
||||
* @param players Array of poker players.
|
||||
* @param winning Pointer to the poker winning to fill out.
|
||||
* @return The winning state for this player.
|
||||
*/
|
||||
void pokerWinnerPlayerGet(
|
||||
poker_t *poker, pokerplayer_t *player, pokerplayerwinning_t *winning
|
||||
pokerdealer_t *dealer, pokerplayer_t *player, pokerplayerwinning_t *winning
|
||||
);
|
||||
|
||||
/**
|
||||
@ -102,6 +102,10 @@ card_t pokerWinnerCompare(
|
||||
* Determines the winning player for the game. Values will be stored back into
|
||||
* the poker winning state.
|
||||
*
|
||||
* @param poker Poker game instance.
|
||||
* @param winner Location to store the winner state.
|
||||
* @param dealer Poker game dealer instance.
|
||||
* @param players Array of poker players.
|
||||
*/
|
||||
void pokerWinnerCalculate(poker_t *poker);
|
||||
void pokerWinnerCalculate(
|
||||
pokerwinner_t *winner, pokerdealer_t *dealer, pokerplayer_t *players
|
||||
);
|
Reference in New Issue
Block a user