diff options
author | Nathan Vance <nathav63@gmail.com> | 2015-02-17 10:35:41 -0500 |
---|---|---|
committer | Nathan Vance <nathav63@gmail.com> | 2015-02-17 10:35:41 -0500 |
commit | ae59eea6c0b8fe2a71896120f196fc200bec56fb (patch) | |
tree | 0ee57425862b1849b75c95665c0b9cf1c241c7c6 /cards.c | |
parent | Added deck data (diff) | |
download | 7w-ae59eea6c0b8fe2a71896120f196fc200bec56fb.tar.gz 7w-ae59eea6c0b8fe2a71896120f196fc200bec56fb.tar.bz2 7w-ae59eea6c0b8fe2a71896120f196fc200bec56fb.zip |
Now separates out cards for a deck and shuffles!
Diffstat (limited to 'cards.c')
-rw-r--r-- | cards.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -10,8 +10,8 @@ char* get_chararray(int size); int* get_intarray(int size); -//era, card#, resource cost / resource production / coupons / couponed by / card name -static int cards[3][CARDSPERERA][200]; +//era, card#, resource cost / resource production / coupons / couponed by / card name / description +static int cards[3][CARDSPERERA][300]; void cards_setcost(int era, int card, int res, int num) { @@ -84,7 +84,7 @@ void cards_updatecoupons() int i, j, k; int* card; for(i = 0; i <= 1; i++) { - for(j = 0; j < CARDSPERERA; j++) { + for(j = 0; j < 27-4*i; j++) { for(k = STARTCOUPONS; k <= STARTCOUPONS+2; k += 2) { if(cards[i][j][k]) { card = cards[cards[i][j][k]][cards[i][j][k+1]]; @@ -124,7 +124,7 @@ void cards_setmessage(int era, int card, char *message) char* cards_specialmessage(int era, int card) { - char *ret = get_chararray(100); + char *ret = get_chararray(200); int i; for(i = 0; (ret[i] = cards[era][card][STARTDESCRIPTION+i]) != '\0'; i++); return ret; |