Empty stacks drawn jit.

This commit is contained in:
Murilo Pereira 2011-05-08 15:17:16 -03:00
parent 22aa293645
commit e2554f181e
3 changed files with 0 additions and 76 deletions

View File

@ -68,78 +68,6 @@ void erase_stack(struct stack *stack) {
delwin(empty_stack);
}
void draw_empty_stacks() {
WINDOW **empty_stack;
if (!(empty_stack = malloc(EMPTY_STACKS_NUMBER * sizeof(**empty_stack)))) {
fprintf(stderr, "%s: %s (%s:%d)\n", program_name, strerror(errno), __FILE__, __LINE__ - 1);
exit(errno);
}
empty_stack[0] = newwin(FRAME_HEIGHT,
FRAME_WIDTH,
STOCK_STARTING_Y,
STOCK_STARTING_X);
empty_stack[1] = newwin(FRAME_HEIGHT,
FRAME_WIDTH,
WASTE_PILE_STARTING_Y,
WASTE_PILE_STARTING_X);
empty_stack[2] = newwin(FRAME_HEIGHT,
FRAME_WIDTH,
FOUNDATION_STARTING_Y,
FOUNDATION_0_STARTING_X);
empty_stack[3] = newwin(FRAME_HEIGHT,
FRAME_WIDTH,
FOUNDATION_STARTING_Y,
FOUNDATION_1_STARTING_X);
empty_stack[4] = newwin(FRAME_HEIGHT,
FRAME_WIDTH,
FOUNDATION_STARTING_Y,
FOUNDATION_2_STARTING_X);
empty_stack[5] = newwin(FRAME_HEIGHT,
FRAME_WIDTH,
FOUNDATION_STARTING_Y,
FOUNDATION_3_STARTING_X);
empty_stack[6] = newwin(FRAME_HEIGHT,
FRAME_WIDTH,
MANEUVRE_STARTING_Y,
MANEUVRE_0_STARTING_X);
empty_stack[7] = newwin(FRAME_HEIGHT,
FRAME_WIDTH,
MANEUVRE_STARTING_Y,
MANEUVRE_1_STARTING_X);
empty_stack[8] = newwin(FRAME_HEIGHT,
FRAME_WIDTH,
MANEUVRE_STARTING_Y,
MANEUVRE_2_STARTING_X);
empty_stack[9] = newwin(FRAME_HEIGHT,
FRAME_WIDTH,
MANEUVRE_STARTING_Y,
MANEUVRE_3_STARTING_X);
empty_stack[10] = newwin(FRAME_HEIGHT,
FRAME_WIDTH,
MANEUVRE_STARTING_Y,
MANEUVRE_4_STARTING_X);
empty_stack[11] = newwin(FRAME_HEIGHT,
FRAME_WIDTH,
MANEUVRE_STARTING_Y,
MANEUVRE_5_STARTING_X);
empty_stack[12] = newwin(FRAME_HEIGHT,
FRAME_WIDTH,
MANEUVRE_STARTING_Y,
MANEUVRE_6_STARTING_X);
for (int i = 0; i < EMPTY_STACKS_NUMBER; i++) {
box(empty_stack[i], 0, 0);
wrefresh(empty_stack[i]);
delwin(empty_stack[i]);
}
free(empty_stack);
return;
}
void draw_value(struct card *card) {
mvwprintw(card->frame->shape, 0, 0, card_value(card->value));
mvwprintw(card->frame->shape,

View File

@ -21,7 +21,6 @@
extern const char *program_name;
void erase_stack(struct stack *);
void draw_empty_stacks();
void draw_value(struct card *);
void draw_suit(struct card *);
void draw_front(struct card *);

View File

@ -294,11 +294,8 @@ void initialize_game() {
shuffle_deck(deck);
deal_cards(deck);
draw_empty_stacks();
draw_cursor(cursor);
draw_deck(deck);
return;
}
void end_game() {