Added waste pile structure.

This commit is contained in:
Murilo Soares Pereira 2010-04-09 00:12:06 -03:00
parent e6a8651fb2
commit db469c318d
2 changed files with 4 additions and 0 deletions

View File

@ -7,6 +7,7 @@ void allocate_deck(struct deck **deck) {
*deck = malloc(sizeof(**deck));
allocate_stack(&((*deck)->stock));
allocate_stack(&((*deck)->waste_pile));
allocate_stack(&((*deck)->foundation_0));
allocate_stack(&((*deck)->foundation_1));
@ -26,6 +27,7 @@ void allocate_deck(struct deck **deck) {
void initialize_deck(struct deck *deck) {
initialize_stack(deck->stock);
initialize_stack(deck->waste_pile);
initialize_stack(deck->foundation_0);
initialize_stack(deck->foundation_1);
@ -45,6 +47,7 @@ void initialize_deck(struct deck *deck) {
void delete_deck(struct deck *deck) {
delete_stack(deck->stock);
delete_stack(deck->waste_pile);
delete_stack(deck->foundation_0);
delete_stack(deck->foundation_1);

View File

@ -7,6 +7,7 @@
struct deck {
struct stack *stock;
struct stack *waste_pile;
struct stack *foundation_0;
struct stack *foundation_1;