diff options
author | Nathan Vance <nathav63@gmail.com> | 2015-02-02 11:32:40 -0500 |
---|---|---|
committer | Nathan Vance <nathav63@gmail.com> | 2015-02-02 11:32:40 -0500 |
commit | e1573d382e5c6cea7d4f470473ed6781553e13a5 (patch) | |
tree | 1efb65025b288b774946fd9079b00fde3f8562fb /cards.c | |
parent | Added basic card printout (diff) | |
download | 7w-e1573d382e5c6cea7d4f470473ed6781553e13a5.tar.gz 7w-e1573d382e5c6cea7d4f470473ed6781553e13a5.tar.bz2 7w-e1573d382e5c6cea7d4f470473ed6781553e13a5.zip |
Added get coupons method
Diffstat (limited to 'cards.c')
-rw-r--r-- | cards.c | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -53,6 +53,26 @@ void cards_setcoupons(int era, int card, int era1, int card1, int era2, int card cards[era][card][i++] = card2; } +//returns the cards this card is a coupon for +int* cards_getcoupons(int era, int card) +{ + int *ret = get_intarray(4); + int i; + for(i = 0; i < 4; i++) + ret[i] = cards[era][card][1+NUMRESOURCES+NUMPRODUCTS+i]; + return ret; +} + +//returns cards that make this card free +int* cards_getcouponed(int era, int card) +{ + int *ret = get_intarray(4); + int i; + for(i = 0; i < 4; i++) + ret[i] = cards[era][card][1+NUMRESOURCES+NUMPRODUCTS+4+i]; + return ret; +} + void cards_updatecoupons() { int i, j, k; |