diff options
author | Nathan Vance <nathav63@gmail.com> | 2015-03-11 20:51:33 -0400 |
---|---|---|
committer | Nathan Vance <nathav63@gmail.com> | 2015-03-11 20:51:33 -0400 |
commit | 0d0206dd0a9a1bb53913a76b0ae6179bb627074e (patch) | |
tree | 35948bee50afb58efe124a34d3f609f721773f50 /ai_weights.c | |
parent | Started work on ai (diff) | |
download | 7w-0d0206dd0a9a1bb53913a76b0ae6179bb627074e.tar.gz 7w-0d0206dd0a9a1bb53913a76b0ae6179bb627074e.tar.bz2 7w-0d0206dd0a9a1bb53913a76b0ae6179bb627074e.zip |
Implemented basic ai
Diffstat (limited to 'ai_weights.c')
-rw-r--r-- | ai_weights.c | 5 |
1 files changed, 3 insertions, 2 deletions
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) |