Writing more poker tests.

This commit is contained in:
2021-10-01 22:31:01 -07:00
parent a2646d5952
commit 2168cb5b8f
3 changed files with 107 additions and 2 deletions

View File

@ -10,6 +10,7 @@
void pokerInit(poker2_t *poker) {
pokerResetRound(poker);
poker->playerCount = 0;
poker->state = 0;
}
void pokerResetRound(poker2_t *poker) {
@ -77,8 +78,6 @@ void pokerPlayerChipsAdd(poker2player_t *player, int32_t chips) {
player->chips += chips;
if(player->chips > 0) {
flagOff(player->state, POKER_PLAYER_STATE_OUT);
} else {
player->state |= POKER_PLAYER_STATE_OUT;
}
}

View File

@ -49,6 +49,8 @@ typedef struct {
poker2player_t players[POKER_PLAYER_COUNT_MAX];
uint8_t playerCount;
uint8_t state;
} poker2_t;