Card 'face' enum, rather than 'exposed' boolean.

This commit is contained in:
Murilo Soares Pereira 2010-04-01 09:50:53 -03:00
parent fc83da462e
commit f57073dc85
2 changed files with 7 additions and 5 deletions

View File

@ -12,7 +12,7 @@ struct card *initialize_card() {
card->frame = initialize_frame();
card->value = NONE;
card->suit = NONE;
card->exposed = FALSE;
card->face = COVERED;
return(card);
}
@ -27,13 +27,13 @@ void delete_card(struct card *card) {
void set_card(struct card *card,
enum value value,
enum suit suit,
char exposed,
enum face face,
int start_y,
int start_x) {
set_frame(card->frame, start_y, start_x);
card->value = value;
card->suit = suit;
card->exposed = exposed;
card->face = face;
return;
}

View File

@ -26,16 +26,18 @@ enum value {
ACE = 14
};
enum face { COVERED, EXPOSED };
struct card {
struct frame *frame;
enum value value;
enum suit suit;
char exposed;
char face;
};
struct card *initialize_card();
void delete_card(struct card *);
void set_card(struct card *, enum value, enum suit, char, int, int);
void set_card(struct card *, enum value, enum suit, enum face, int, int);
void refresh_card(struct card *);
#endif