Adding irrelevant values to enums.

This commit is contained in:
Murilo Soares Pereira 2010-04-01 10:13:37 -03:00
parent f57073dc85
commit 7c3c72a0fd
2 changed files with 25 additions and 21 deletions

View File

@ -10,9 +10,9 @@ struct card *initialize_card() {
card = malloc(sizeof(card));
card->frame = initialize_frame();
card->value = NONE;
card->suit = NONE;
card->face = COVERED;
card->value = NO_VALUE;
card->suit = NO_SUIT;
card->face = NO_FACE;
return(card);
}

View File

@ -1,16 +1,8 @@
#ifndef CARD_H
#define CARD_H
enum suit {
BLANK = -1,
DIAMONDS = 0,
SPADES = 1,
HEARTS = 2,
CLUBS = 3
};
enum value {
NONE = -1,
NO_VALUE = -1,
TWO = 2,
THREE = 3,
FOUR = 4,
@ -26,7 +18,19 @@ enum value {
ACE = 14
};
enum face { COVERED, EXPOSED };
enum suit {
NO_SUIT = -1,
DIAMONDS = 0,
SPADES = 1,
HEARTS = 2,
CLUBS = 3
};
enum face {
NO_FACE = -1,
COVERED = 0,
EXPOSED = 1
};
struct card {
struct frame *frame;