aboutsummaryrefslogtreecommitdiff
path: root/ai_trade.c
diff options
context:
space:
mode:
authorNathan Vance <nathav63@gmail.com>2016-02-07 17:56:45 -0500
committerNathan Vance <nathav63@gmail.com>2016-02-07 17:56:45 -0500
commit5ff076c4e040563be94726ba8104444713c8a546 (patch)
tree09fb2a7349804f1cd6f30c4b7846a7669c5022c9 /ai_trade.c
parentUpdated to work with gcc 5.X (diff)
download7w-master.tar.gz
7w-master.tar.bz2
7w-master.zip
Bug fixes dealing with colorHEADmaster
Diffstat (limited to 'ai_trade.c')
-rw-r--r--ai_trade.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/ai_trade.c b/ai_trade.c
index d20d05d..b255988 100644
--- a/ai_trade.c
+++ b/ai_trade.c
@@ -2,13 +2,14 @@
/*
A brief note on why we have separated the functionality of trade.c and ai_trade.c in regards to gold transfer:
- This class is designed for the sole purpose of analyzing potential transactions without committing to any. Therefore, such handy methods as trade_commit are not used.
+ This class is designed for the sole purpose of analyzing potential transactions without committing to any.
+ Therefore, such handy methods as trade_commit are not used.
*/
static int bestCost[3];
static int baseCost[NUMRESOURCES];
-void ai_cleartrade(int trade[3][GOLD]) {
+void clearTrade(int trade[3][GOLD]) {
int i, j;
for (i = 0; i < 3; i++) {
bestCost[i] = 0;
@@ -87,11 +88,11 @@ int* ai_trade(int player, int era, int card, int ret[3]) {
int i;
for (i = 0; i < 3; i++)
ret[i] = 0;
- ai_cleartrade(trade);
+ clearTrade(trade);
cards_getcost(era, card, baseCost);
recurse(ret, 0, trade, player, era, card);
restoreCost(ret);
- ai_cleartrade(trade);
+ clearTrade(trade);
trade_set(player, trade);
return ret;
}
bgstack15