blob: 206a9d85f179ec963819e1a630cd1eb930ef8e2c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
#include "card_stack.h"
#include <assert.h>
#include <stdlib.h>
uint32_t card_stack_get_points(const card_stack_t *cs)
{
assert(cs != NULL);
uint32_t points = 0;
for(uint8_t i = 0; i < MAX_CARD_STACK_SIZE; i++)
{
if(cs->cards[i] > 0)
points += card_get_points(cs->cards[i]);
}
return points;
}
|