diff options
author | Nathan Vance <nathav63@gmail.com> | 2015-03-12 22:23:08 -0400 |
---|---|---|
committer | Nathan Vance <nathav63@gmail.com> | 2015-03-12 22:23:08 -0400 |
commit | 9dd5bd8c4f57143c365088ba2e964f339189f781 (patch) | |
tree | 1678c5bf126cb7ecaf35a6c4a9fdcc32dd745663 /player_turn.c | |
parent | Now cannot buy two of the same card (diff) | |
download | 7w-9dd5bd8c4f57143c365088ba2e964f339189f781.tar.gz 7w-9dd5bd8c4f57143c365088ba2e964f339189f781.tar.bz2 7w-9dd5bd8c4f57143c365088ba2e964f339189f781.zip |
Fixed bug causing trade to print incorrectly
Diffstat (limited to 'player_turn.c')
-rw-r--r-- | player_turn.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/player_turn.c b/player_turn.c index 891c565..ba35953 100644 --- a/player_turn.c +++ b/player_turn.c @@ -25,12 +25,12 @@ int postoptions(int x, int y); int trade_routine(int x, int y, int player); void trade_commit(int player); -int player_build(int focus, int cursor, int player) +int player_build(int focus, int cursor, int player, int y) { int *hand = data_gethand(player); if(focus == data_numplayers()) { if(hand[cursor] == -1) return 0; - int choice = postoptions(62, 20); + int choice = postoptions(61, y); if(choice == 0) { if(data_hasbuiltname(player, data_getera(), hand[cursor])) { postmessage("Cannot have two of the same card!"); @@ -75,7 +75,7 @@ void player_turn(int player) case LEFT: focus--; break; case ENTER: - if(player_build(focus, cursor, player)) { + if(player_build(focus, cursor, player, tradey)) { trade_commit(player); clearmessage(); return; @@ -92,7 +92,7 @@ void player_turn(int player) if(focus == data_numplayers()) { if(cursor < 0) cursor = numcards-2; if(cursor >= numcards-1) { - if(trade_routine(61, tradey, player)) cursor = 0; + if(trade_routine(61, view_refresh(focus, cursor, player), player)) cursor = 0; else cursor = numcards-2; } } |