aboutsummaryrefslogtreecommitdiff
path: root/ai.c
diff options
context:
space:
mode:
authorNathan Vance <nathav63@gmail.com>2015-03-11 22:31:44 -0400
committerNathan Vance <nathav63@gmail.com>2015-03-11 22:31:44 -0400
commit1a39ccc3088dd3fbc6da9571a17060cc50f432e4 (patch)
treef8e4973ac8044535d64526f2281b8953484e261a /ai.c
parentImplemented basic ai (diff)
download7w-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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ai.c b/ai.c
index 5c0901a..7bb9f86 100644
--- a/ai.c
+++ b/ai.c
@@ -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;
bgstack15