diff options
| author | Mario Kilies <MarioKilies@GMX.net> | 2011-01-04 03:41:55 +0100 |
|---|---|---|
| committer | Mario Kilies <MarioKilies@GMX.net> | 2011-01-04 03:41:55 +0100 |
| commit | 81bbb4b5fce757d0be8166cc44d2a15a2d9f247b (patch) | |
| tree | a32f6db9e5ee54bd0e8e1068dbbc5ba0dbd4fa23 /src/common.h | |
| parent | baee729cd17c59253319ae8281f49e49abd76644 (diff) | |
cardpoints(): Rewritten code that is more readable.
Changed return values from int to uint32_t.
Added display initialization to main().
Diffstat (limited to 'src/common.h')
| -rw-r--r-- | src/common.h | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/common.h b/src/common.h index 13fcf7c..5bd31f7 100644 --- a/src/common.h +++ b/src/common.h @@ -1,10 +1,16 @@ +#ifndef OXEN_COMMON_H +#define OXEN_COMMON_H + +#include <stdint.h> + #define MAX_CARDSTACK_SIZE 5 -#define MAX_CARDHAND_SIZE 10 +#define MAX_HAND_SIZE 10 typedef char card; -typedef card cardstack[5]; -typedef card hand[10]; +typedef card cardstack[MAX_CARDSTACK_SIZE]; +typedef card hand[MAX_HAND_SIZE]; -int cardpoints(card c); -int stackpoints(cardstack s); +uint32_t cardpoints(const card c); +uint32_t stackpoints(const cardstack s); +#endif // OXEN_COMMON_H |
