diff options
author | Nathan Vance <nathav63@gmail.com> | 2015-02-28 23:21:31 -0500 |
---|---|---|
committer | Nathan Vance <nathav63@gmail.com> | 2015-02-28 23:21:31 -0500 |
commit | f0bbfee11a0418064a142101a952c3043dde7351 (patch) | |
tree | d5105137ea14d3574b2b16c96d8c320870e18dd9 /data.c | |
parent | Correctly toggles (diff) | |
download | 7w-f0bbfee11a0418064a142101a952c3043dde7351.tar.gz 7w-f0bbfee11a0418064a142101a952c3043dde7351.tar.bz2 7w-f0bbfee11a0418064a142101a952c3043dde7351.zip |
Started work on ai
Diffstat (limited to 'data.c')
-rw-r--r-- | data.c | 15 |
1 files changed, 14 insertions, 1 deletions
@@ -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; +} |