summary refs log tree commit diff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--stack.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/stack.h b/stack.h
index b7b018f..61c6fc2 100644
--- a/stack.h
+++ b/stack.h
@@ -23,6 +23,10 @@
 
 #include "cards.h"
 
+#ifndef STACK_CAP
+#define STACK_CAP 52
+#endif
+
 typedef Sint8 Card;
 
 static int cardSuit(Card card) {
@@ -48,7 +52,7 @@ static int cardRank(Card card) {
 
 struct Stack {
 	Uint8 len;
-	Card cards[52];
+	Card cards[STACK_CAP];
 };
 
 static inline void stackClear(struct Stack *stack) {
@@ -56,7 +60,7 @@ static inline void stackClear(struct Stack *stack) {
 }
 
 static inline void stackPush(struct Stack *stack, Card card) {
-	assert(stack->len < 52);
+	assert(stack->len < STACK_CAP);
 	stack->cards[stack->len++] = card;
 }