2010-04-01 05:28:00 +00:00
|
|
|
#ifndef CARD_H
|
|
|
|
#define CARD_H
|
|
|
|
|
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
|
|
|
};
|
|
|
|
|
2010-04-05 07:33:10 +00:00
|
|
|
void allocate_card(struct card **);
|
|
|
|
void initialize_card(struct card *);
|
2011-02-14 02:10:47 +00:00
|
|
|
void free_card(struct card *);
|
2010-04-01 12:50:53 +00:00
|
|
|
void set_card(struct card *, enum value, enum suit, enum face, int, int);
|
2010-04-10 03:45:54 +00:00
|
|
|
void expose_card(struct card *);
|
|
|
|
void cover_card(struct card *);
|
2011-06-03 05:48:26 +00:00
|
|
|
struct card *duplicate_card(struct card *);
|
2011-06-06 02:08:08 +00:00
|
|
|
void mark_card(struct card *);
|
|
|
|
void unmark_card(struct card *);
|
2010-04-01 05:28:00 +00:00
|
|
|
|
|
|
|
#endif
|