diff options
author | Nathan Vance <nathav63@gmail.com> | 2015-03-11 22:31:44 -0400 |
---|---|---|
committer | Nathan Vance <nathav63@gmail.com> | 2015-03-11 22:31:44 -0400 |
commit | 1a39ccc3088dd3fbc6da9571a17060cc50f432e4 (patch) | |
tree | f8e4973ac8044535d64526f2281b8953484e261a /ai.c | |
parent | Implemented basic ai (diff) | |
download | 7w-1a39ccc3088dd3fbc6da9571a17060cc50f432e4.tar.gz 7w-1a39ccc3088dd3fbc6da9571a17060cc50f432e4.tar.bz2 7w-1a39ccc3088dd3fbc6da9571a17060cc50f432e4.zip |
Squelched some bugs, more to go!
Diffstat (limited to 'ai.c')
-rw-r--r-- | ai.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1,6 +1,6 @@ #include "7w.h" -int data_canafford(int p, int *cost); +int data_canafford(int p, int era, int card); int* data_gethand(int p); int data_numcards(int p); int data_getera(); @@ -23,7 +23,7 @@ int* ai_bestcard(int *hand, int player) //return card int card = 0; for(i = 0; hand[i] != -1 && i < 7; i++) { temp = weight_buildcard(data_getera(), hand[i], player); - if(! data_canafford(player, cards_getcost(data_getera(), hand[i]))) + if(! data_canafford(player, data_getera(), hand[i])) temp = 0; if(temp > max) { max = temp; |