Implemented game#valid_move.

This commit is contained in:
Murilo Pereira
2011-05-07 23:09:39 -03:00
parent 854184c2fd
commit e7706dfa4b
7 changed files with 488 additions and 19 deletions
+10 -3
View File
@@ -66,8 +66,6 @@ void erase_stack(struct stack *stack) {
box(empty_stack, 0, 0);
wrefresh(empty_stack);
delwin(empty_stack);
return;
}
void draw_empty_stacks() {
@@ -198,7 +196,16 @@ void draw_card(struct card *card) {
}
void draw_stack(struct stack *stack) {
if (!empty(stack)) {
erase_stack(stack);
if (empty(stack)) {
WINDOW *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);
} else {
if (maneuvre_stack(stack)) {
struct stack *reversed_stack = reverse(stack);