From ad802570d327a7751296285bde645c2bbb2ccf1c Mon Sep 17 00:00:00 2001 From: Nathan Vance Date: Thu, 19 Mar 2015 22:11:22 -0400 Subject: started thinking about ai trading --- trade.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'trade.c') diff --git a/trade.c b/trade.c index 002dcac..4299bb8 100644 --- a/trade.c +++ b/trade.c @@ -51,6 +51,17 @@ void trade_clear(int player) tradebuffer[i][j] = 0; } +void trade_set(int player, int **trade) +{ + trade_clear(player); + int i, j; + for(i = 0; i < 3; i++) { + for(j = 0; j < GOLD; j++) { + tradebuffer[i][j] = trade[i][j]; + } + } +} + //gold amounts relative to player void trade_addgold(int player, int amnt, int direction) { -- cgit