From 0d0206dd0a9a1bb53913a76b0ae6179bb627074e Mon Sep 17 00:00:00 2001 From: Nathan Vance Date: Wed, 11 Mar 2015 20:51:33 -0400 Subject: Implemented basic ai --- ai_weights.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'ai_weights.c') diff --git a/ai_weights.c b/ai_weights.c index e76e9bf..b56fe70 100644 --- a/ai_weights.c +++ b/ai_weights.c @@ -109,15 +109,16 @@ int weight_buildcard(int era, int card, int player) { int weight = data_potentialvps(player, era, card); weight -= data_gettotvps(player); + if(cards_gettype(era, card) == MILITARY) + weight += weight_military(era, card, player); if(era == 2) return weight; if(cards_gettype(era, card) == SCIENTIFIC) weight += weight_science(era, card, player); - if(cards_gettype(era, card) == MILITARY) - weight += weight_military(era, card, player); if(cards_gettype(era, card) == RESOURCE || cards_gettype(era, card) == INDUSTRY) weight += weight_resource(era, card, player); if(cards_gettype(era, card) == COMMERCIAL) weight += weight_commercial(era, card, player); + return weight; } int weight_buildwonder(int player) -- cgit