summaryrefslogtreecommitdiff
path: root/src/card.c
diff options
context:
space:
mode:
authorMario Kilies <MarioKilies@GMX.net>2011-01-29 15:50:58 +0100
committerMario Kilies <MarioKilies@GMX.net>2011-01-29 15:50:58 +0100
commit4a3e066c4c9885396893afcd2a13aa599ac4bd0e (patch)
tree753ba8320b71e7031e1bc4b1f59b011669ce8114 /src/card.c
parent4980a92f245cf4f313d99f8c31dc61218696e98c (diff)
parent947669f063f3df9fc93a4afb2d7c9e6d3d13813a (diff)
Merge branch 'master' of ssh://git@wg.reiner-h.de:22003/~git/oxen
Diffstat (limited to 'src/card.c')
-rw-r--r--src/card.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/card.c b/src/card.c
index 25db247..5132be6 100644
--- a/src/card.c
+++ b/src/card.c
@@ -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);