tty-solitaire/lib/stack.h

25 lines
555 B
C
Raw Normal View History

2010-04-03 21:44:59 -03:00
#ifndef STACK_H
#define STACK_H
2010-04-04 21:54:22 -03:00
#include "card.h"
#define MANEUVRE_STACKS_START_Y 7
2010-04-03 21:44:59 -03:00
struct stack {
struct card *card;
struct stack *next;
};
void allocate_stack(struct stack **);
void initialize_stack(struct stack *);
2010-04-06 21:59:21 -03:00
void delete_stack(struct stack *);
2010-04-03 22:12:42 -03:00
bool empty(struct stack *);
int length(struct stack *);
2010-04-04 03:20:56 -03:00
void push(struct stack **, struct card *);
2010-04-04 04:15:43 -03:00
struct stack *pop(struct stack **);
bool maneuvre_stack(struct stack *);
void refresh_card_coordinates(struct stack *, struct stack *);
void move_card(struct stack **, struct stack **);
2010-04-03 22:12:42 -03:00
2010-04-03 21:44:59 -03:00
#endif