aboutsummaryrefslogtreecommitdiff
path: root/data.c
diff options
context:
space:
mode:
authorNathan Vance <nathav63@gmail.com>2015-02-28 23:21:31 -0500
committerNathan Vance <nathav63@gmail.com>2015-02-28 23:21:31 -0500
commitf0bbfee11a0418064a142101a952c3043dde7351 (patch)
treed5105137ea14d3574b2b16c96d8c320870e18dd9 /data.c
parentCorrectly toggles (diff)
download7w-f0bbfee11a0418064a142101a952c3043dde7351.tar.gz
7w-f0bbfee11a0418064a142101a952c3043dde7351.tar.bz2
7w-f0bbfee11a0418064a142101a952c3043dde7351.zip
Started work on ai
Diffstat (limited to 'data.c')
-rw-r--r--data.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/data.c b/data.c
index 75df70b..2763cb8 100644
--- a/data.c
+++ b/data.c
@@ -128,7 +128,8 @@ int data_getwest(int p)
int data_getdir(int dir, int p)
{
if(dir == 0) return data_geteast(p);
- return data_getwest(p);
+ if(dir == 1) return data_getwest(p);
+ return p;
}
int* data_gethand(int p)
@@ -411,3 +412,15 @@ int data_gettotvps(int p)
tot += science(p);
return tot;
}
+
+int data_potentialvps(int p, int era, int card)
+{
+ int i;
+ for(i = 0; player[p][era][i] != -1; i++); //get free spot in array
+ player[p][era][i] = card; //build card
+ player[i][3][3] += cards_getproduction(era, card)[GOLD];
+ int vps = data_gettotvps(p);
+ player[p][era][i] = -1;
+ player[i][3][3] -= cards_getproduction(era, card)[GOLD];
+ return vps;
+}
bgstack15