aboutsummaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
authorNathan Vance <nathav63@gmail.com>2015-03-12 22:23:08 -0400
committerNathan Vance <nathav63@gmail.com>2015-03-12 22:23:08 -0400
commit9dd5bd8c4f57143c365088ba2e964f339189f781 (patch)
tree1678c5bf126cb7ecaf35a6c4a9fdcc32dd745663 /io.c
parentNow cannot buy two of the same card (diff)
download7w-9dd5bd8c4f57143c365088ba2e964f339189f781.tar.gz
7w-9dd5bd8c4f57143c365088ba2e964f339189f781.tar.bz2
7w-9dd5bd8c4f57143c365088ba2e964f339189f781.zip
Fixed bug causing trade to print incorrectly
Diffstat (limited to 'io.c')
-rw-r--r--io.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/io.c b/io.c
index bec7045..c0d6358 100644
--- a/io.c
+++ b/io.c
@@ -193,22 +193,19 @@ int io_printhand(int x, int y, int player, int cursor)
{
int *hand = data_gethand(player);
int i;
- int cursed = 0;
io_printborder(x, y++, 28);
y = io_printtext(x, y, 28, " Hand");
for(i = 0; hand[i] != -1 && i < 7; i++) {
io_printname(x, y++, data_getera(), hand[i]);
if(i == cursor) {
mvprintw(y-1, x+25, "*");
- cursed = 1;
}
}
y = io_printtext(x, y, 28, " Trade...");
- if(i == cursor) {
+ if(i == cursor)
mvprintw(y-1, x+25, "*");
- //trade_print(x, y, player, -1, -1);
- }
- else if(cursed) io_printcard(x, y, data_getera(), hand[cursor], player);
+ else if(cursor >= 0 && cursor < 7 && hand[cursor] != -1)
+ y = io_printcard(x, y, data_getera(), hand[cursor], player);
else io_printborder(x, y++, 28);
return y;
}
bgstack15