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
+7 -1
View File
@@ -1,6 +1,7 @@
#include <malloc.h>
#include <stdbool.h>
#include "stack.h"
#include "game.h"
void allocate_stack(struct stack **stack) {
*stack = malloc(sizeof(**stack));
@@ -79,7 +80,12 @@ struct stack *pop(struct stack **stack) {
}
bool maneuvre_stack(struct stack *stack) {
return(stack->card->frame->start_y >= MANEUVRE_STACKS_START_Y);
return(stack->card->frame->start_y >= MANEUVRE_STACKS_STARTING_Y);
}
bool waste_pile_stack(struct stack *stack) {
return((stack->card->frame->start_x == WASTE_PILE_STARTING_X) &&
(stack->card->frame->start_y == WASTE_PILE_STARTING_Y));
}
void refresh_card_coordinates(struct stack *origin, struct stack *destination) {