summaryrefslogtreecommitdiff
path: root/src/resources
diff options
context:
space:
mode:
Diffstat (limited to 'src/resources')
-rw-r--r--src/resources/item/cardslist.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/resources/item/cardslist.h b/src/resources/item/cardslist.h
index f8a7fee3a..8da565091 100644
--- a/src/resources/item/cardslist.h
+++ b/src/resources/item/cardslist.h
@@ -40,6 +40,28 @@ struct CardsList final
cards[3] = card3;
}
+ CardsList(const int *const cards0)
+ {
+ if (cards0)
+ {
+ for (int f = 0; f < maxCards; f ++)
+ cards[f] = cards0[f];
+ }
+ else
+ {
+ for (int f = 0; f < maxCards; f ++)
+ cards[f] = 0;
+ }
+ }
+
+ bool isEmpty() const A_WARN_UNUSED
+ {
+ return cards[0] == 0 &&
+ cards[1] == 0 &&
+ cards[2] == 0 &&
+ cards[3] == 0;
+ }
+
int cards[maxCards];
};