tty-solitaire/lib/stack.h

45 lines
1.0 KiB
C
Raw Normal View History

2010-04-04 00:44:59 +00:00
#ifndef STACK_H
#define STACK_H
2010-04-05 00:54:22 +00:00
#include "card.h"
#define MANEUVRE_STACKS_STARTING_Y 7
#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-04 00:44:59 +00:00
struct stack {
struct card *card;
struct stack *next;
};
extern const char *program_name;
void allocate_stack(struct stack **);
void initialize_stack(struct stack *);
2011-02-14 02:10:47 +00:00
void free_stack(struct stack *);
2010-04-04 01:12:42 +00:00
bool empty(struct stack *);
int length(struct stack *);
2010-04-04 06:20:56 +00:00
void push(struct stack **, struct card *);
2010-04-04 07:15:43 +00:00
struct stack *pop(struct stack **);
2010-04-04 01:12:42 +00:00
2010-04-04 00:44:59 +00:00
#endif