1 /* $Id: pile.h,v 1.1.1.1 1997/02/21 21:04:17 sverrehu Exp $ */ 2 #ifndef PILE_H 3 #define PILE_H 4 5 #include "card.h" 6 7 typedef struct pile { 8 int x, y; /* upper left location of bottom card in pile */ 9 int maxWidth; /* max width of pile in pixels (for clearing) */ 10 int maxHeight; 11 int dx, dy; /* delta x,y for each card */ 12 int deltaEach; /* apply delta to each n'th card. if negative, 13 apply delta to n topmost cards. */ 14 int outline; /* outline to draw when pile is empty, or -1 if none */ 15 int numCards; /* number of cards */ 16 Card *bottom; 17 Card *top; 18 } Pile; 19 20 Pile *pileNew(void); 21 void pileDelete(Pile *p); 22 23 void pileInsertCardBefore(Pile *p, Card *c, Card *before); 24 void pileAddCardBottom(Pile *p, Card *c); 25 void pileAddCardTop(Pile *p, Card *c); 26 27 void pileInsertPileBefore(Pile *p, Pile *ip, Card *before); 28 void pileAddPileBottom(Pile *p, Pile *ap); 29 void pileAddPileTop(Pile *p, Pile *ap); 30 31 void pileRemoveCard(Pile *p, Card *c); 32 void pileRemoveAllCards(Pile *p); 33 34 Pile *pileMoveToNewPileFromCard(Pile *p, Card *c); 35 36 #endif 37