summaryrefslogtreecommitdiff
path: root/src/item.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/item.cpp')
-rw-r--r--src/item.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/item.cpp b/src/item.cpp
index d42a11859..7fa816c86 100644
--- a/src/item.cpp
+++ b/src/item.cpp
@@ -160,3 +160,15 @@ void Item::setCards(const int *const cards, const int size)
for (int f = 0; f < sz; f ++)
mCards[f] = cards[f];
}
+
+void Item::addCard(const int card)
+{
+ for (int f = 0; f < maxCards; f ++)
+ {
+ if (!mCards[f])
+ {
+ mCards[f] = card;
+ return;
+ }
+ }
+}