diff options
author | Nathan Vance <nathav63@gmail.com> | 2015-03-19 22:11:22 -0400 |
---|---|---|
committer | Nathan Vance <nathav63@gmail.com> | 2015-03-19 22:11:22 -0400 |
commit | ad802570d327a7751296285bde645c2bbb2ccf1c (patch) | |
tree | e3686589e12b175433f5ae669b11a00dbae48825 /trade.c | |
parent | ui and trading bug fixes (diff) | |
download | 7w-ad802570d327a7751296285bde645c2bbb2ccf1c.tar.gz 7w-ad802570d327a7751296285bde645c2bbb2ccf1c.tar.bz2 7w-ad802570d327a7751296285bde645c2bbb2ccf1c.zip |
started thinking about ai trading
Diffstat (limited to 'trade.c')
-rw-r--r-- | trade.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -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) { |