Erasing stacks when empty. Also moved some event-related code to the keyboard object.

This commit is contained in:
Murilo Soares Pereira
2010-04-21 04:14:39 -03:00
parent 87909b5075
commit 7b39ec5cc6
11 changed files with 50 additions and 16 deletions
+16
View File
@@ -46,6 +46,22 @@ char *card_value(enum value value) {
return(card_value);
}
void erase_stack(struct stack *stack) {
WINDOW *empty_stack = NULL;
wbkgd(stack->card->frame->shape, WHITE_ON_GREEN);
wrefresh(stack->card->frame->shape);
empty_stack = newwin(FRAME_HEIGHT,
FRAME_WIDTH,
stack->card->frame->start_y,
stack->card->frame->start_x);
box(empty_stack, 0, 0);
wrefresh(empty_stack);
delwin(empty_stack);
return;
}
void draw_empty_stacks() {
WINDOW **empty_stack;