tty-solitaire/src/card.h

43 lines
773 B
C
Raw Normal View History

2011-06-06 04:33:49 +00:00
#ifndef TTY_SOLITAIRE_CARD_H
#define TTY_SOLITAIRE_CARD_H
2010-04-01 05:28:00 +00:00
2010-04-05 00:54:22 +00:00
#include "frame.h"
2010-04-01 13:13:37 +00:00
enum value {
NO_VALUE = -1,
2011-06-03 03:07:02 +00:00
ACE,
TWO,
THREE,
FOUR,
FIVE,
SIX,
SEVEN,
EIGHT,
NINE,
TEN,
JACK,
QUEEN,
KING
2010-04-01 05:28:00 +00:00
};
2011-06-03 03:07:02 +00:00
enum suit { NO_SUIT = -1, DIAMONDS, SPADES, HEARTS, CLUBS };
enum face { NO_FACE = -1, COVERED, EXPOSED };
2010-04-01 05:28:00 +00:00
struct card {
struct frame *frame;
enum value value;
enum suit suit;
2010-04-01 13:18:57 +00:00
enum face face;
2010-04-01 05:28:00 +00:00
};
void card_malloc(struct card **);
void card_init(struct card *);
void card_free(struct card *);
void card_set(struct card *, enum value, enum suit, enum face, int, int);
void card_expose(struct card *);
void card_cover(struct card *);
void card_mark(struct card *);
void card_unmark(struct card *);
struct card *card_dup(struct card *);
2010-04-01 05:28:00 +00:00
#endif