aboutsummaryrefslogtreecommitdiff
path: root/data.c
diff options
context:
space:
mode:
authorNathan Vance <nathav63@gmail.com>2015-02-20 17:18:43 -0500
committerNathan Vance <nathav63@gmail.com>2015-02-20 17:18:43 -0500
commitb29c03dd3b933d05e2f569acafeb7405971eb9e2 (patch)
treeea9090a2a45be4f675fde6023af1e49a886271b1 /data.c
parentStarted backend for game view (diff)
download7w-b29c03dd3b933d05e2f569acafeb7405971eb9e2.tar.gz
7w-b29c03dd3b933d05e2f569acafeb7405971eb9e2.tar.bz2
7w-b29c03dd3b933d05e2f569acafeb7405971eb9e2.zip
Added view for all wonders
Diffstat (limited to 'data.c')
-rw-r--r--data.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/data.c b/data.c
index 8be97a9..eb499cc 100644
--- a/data.c
+++ b/data.c
@@ -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;
}
bgstack15