Fixed betting bugs.
This commit is contained in:
@ -7,8 +7,19 @@
|
||||
|
||||
#include "player.h"
|
||||
|
||||
bool pokerPlayerIsAlive(pokerplayer_t *player) {
|
||||
return !(player->state & (POKER_PLAYER_STATE_FOLDED|POKER_PLAYER_STATE_OUT));
|
||||
bool pokerPlayerIsInRound(pokerplayer_t *player) {
|
||||
return !(
|
||||
player->state & (POKER_PLAYER_STATE_FOLDED|POKER_PLAYER_STATE_OUT)
|
||||
);
|
||||
}
|
||||
|
||||
uint8_t pokerPlayerGetCountInRound(pokerplayer_t *players) {
|
||||
return (uint8_t)arraySum(
|
||||
sizeof(pokerplayer_t),
|
||||
players,
|
||||
POKER_PLAYER_COUNT,
|
||||
(arraysumcallback_t *)(&pokerPlayerIsInRound)
|
||||
);
|
||||
}
|
||||
|
||||
void pokerPlayerReset(pokerplayer_t *player) {
|
||||
|
Reference in New Issue
Block a user