diff options
Diffstat (limited to 'src/card.c')
| -rw-r--r-- | src/card.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -1,6 +1,14 @@ #include "card.h" #include <assert.h> +/** + * Calculate the score of a single card + * Cards divisible by 5: 2 points + * Cards divisible by 10: 3 points + * Cards divisible by 11: 5 points + * Card 55 (divisible by 5 and 11): 7 points + * @return Score of the card + */ uint32_t card_get_points(const card c) { assert(c > 0 && c <= 105); |
