diff options
author | Nathan Vance <nathav63@gmail.com> | 2015-02-20 17:18:43 -0500 |
---|---|---|
committer | Nathan Vance <nathav63@gmail.com> | 2015-02-20 17:18:43 -0500 |
commit | b29c03dd3b933d05e2f569acafeb7405971eb9e2 (patch) | |
tree | ea9090a2a45be4f675fde6023af1e49a886271b1 /data.c | |
parent | Started backend for game view (diff) | |
download | 7w-b29c03dd3b933d05e2f569acafeb7405971eb9e2.tar.gz 7w-b29c03dd3b933d05e2f569acafeb7405971eb9e2.tar.bz2 7w-b29c03dd3b933d05e2f569acafeb7405971eb9e2.zip |
Added view for all wonders
Diffstat (limited to 'data.c')
-rw-r--r-- | data.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -212,15 +212,16 @@ int data_canafford(int p, int *cost) int* data_getbuilt(int p) { - int *ret = get_intarray(42); + int *ret = get_intarray(43); int type, e, c; int i = 0; for(type = 0; type <= 7; type++) for(e = 0; e < 3; e++) for(c = 0; c < 7; c++) - if(cards_gettype(e, player[p][e][c]) == type) { + if(player[p][e][c] != -1 && cards_gettype(e, player[p][e][c]) == type) { ret[i++] = e; ret[i++] = player[p][e][c]; } + ret[i] = -1; //Cap it here return ret; } |