diff options
Diffstat (limited to 'src/hand.c')
| -rw-r--r-- | src/hand.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -24,3 +24,14 @@ void hand_remove_card(hand_t *h, const uint8_t card_index) h->cards[card_index] = 0; } + +const uint8_t hand_count_cards(const hand_t* h) +{ + uint8_t count = 0; + for(int i=0; i<MAX_HAND_CARDS; i++) + if(h->cards[i] != 0) + count++; + + return count; +} + |
