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"
|
|
|
|
|
2010-04-21 04:14:39 -03:00
|
|
|
#define MANEUVRE_STACKS_STARTING_Y 7
|
2010-04-10 00:32:25 -03:00
|
|
|
|
2011-02-06 04:03:40 -02:00
|
|
|
#define STOCK_STARTING_X 1
|
|
|
|
#define STOCK_STARTING_Y 1
|
|
|
|
|
|
|
|
#define WASTE_PILE_STARTING_X 9
|
|
|
|
#define WASTE_PILE_STARTING_Y 1
|
|
|
|
|
|
|
|
#define FOUNDATION_STARTING_Y 1
|
|
|
|
#define FOUNDATION_0_STARTING_X 25
|
|
|
|
#define FOUNDATION_1_STARTING_X 33
|
|
|
|
#define FOUNDATION_2_STARTING_X 41
|
|
|
|
#define FOUNDATION_3_STARTING_X 49
|
|
|
|
|
|
|
|
#define MANEUVRE_STARTING_Y 9
|
|
|
|
#define MANEUVRE_0_STARTING_X 1
|
|
|
|
#define MANEUVRE_1_STARTING_X 9
|
|
|
|
#define MANEUVRE_2_STARTING_X 17
|
|
|
|
#define MANEUVRE_3_STARTING_X 25
|
|
|
|
#define MANEUVRE_4_STARTING_X 33
|
|
|
|
#define MANEUVRE_5_STARTING_X 41
|
|
|
|
#define MANEUVRE_6_STARTING_X 49
|
|
|
|
|
2010-04-03 21:44:59 -03:00
|
|
|
struct stack {
|
|
|
|
struct card *card;
|
|
|
|
struct stack *next;
|
|
|
|
};
|
|
|
|
|
2011-02-06 03:44:45 -02:00
|
|
|
extern const char *program_name;
|
|
|
|
|
2010-04-05 04:33:10 -03:00
|
|
|
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 **);
|
2010-04-09 00:49:17 -03:00
|
|
|
void move_card(struct stack **, struct stack **);
|
2010-04-03 22:12:42 -03:00
|
|
|
|
2010-04-03 21:44:59 -03:00
|
|
|
#endif
|