A bit more code cleaning.
This commit is contained in:
@ -13,4 +13,16 @@ bool pokerPlayerIsAlive(pokerplayer_t *player) {
|
||||
|
||||
bool pokerPlayerIsHuman(poker_t *poker, pokerplayer_t *player) {
|
||||
return (poker->players + POKER_PLAYER_HUMAN_INDEX) == player;
|
||||
}
|
||||
|
||||
|
||||
void pokerPlayerReset(pokerplayer_t *player) {
|
||||
player->cardCount = 0;
|
||||
player->currentBet = 0;
|
||||
|
||||
// Invert then bitwise AND to turn off.
|
||||
player->state &= ~(
|
||||
POKER_PLAYER_STATE_FOLDED |
|
||||
POKER_PLAYER_STATE_SHOWING
|
||||
);
|
||||
}
|
Reference in New Issue
Block a user