2010-04-10 16:39:22 +00:00
|
|
|
#include <stdio.h>
|
2010-04-10 16:49:19 +00:00
|
|
|
#include "card_debug.h"
|
2010-04-10 16:39:22 +00:00
|
|
|
|
|
|
|
void print_card(struct card *card) {
|
|
|
|
switch (card->face) {
|
|
|
|
case NO_FACE: printf("No face "); break;
|
|
|
|
case COVERED: printf("Covered "); break;
|
|
|
|
case EXPOSED: printf("Exposed "); break;
|
2010-04-11 20:13:06 +00:00
|
|
|
default : printf("? ");
|
2010-04-10 16:39:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
switch (card->value) {
|
|
|
|
case NO_VALUE: printf(", no value "); break;
|
2010-04-11 20:13:06 +00:00
|
|
|
case TWO : printf("two "); break;
|
2010-04-10 16:39:22 +00:00
|
|
|
case THREE : printf("three "); break;
|
|
|
|
case FOUR : printf("four "); break;
|
2010-04-11 20:13:06 +00:00
|
|
|
case FIVE : printf("five "); break;
|
|
|
|
case SIX : printf("six "); break;
|
|
|
|
case SEVEN : printf("seven "); break;
|
|
|
|
case EIGHT : printf("eight "); break;
|
|
|
|
case NINE : printf("nine "); break;
|
|
|
|
case TEN : printf("ten "); break;
|
|
|
|
case JACK : printf("jack "); break;
|
2010-04-10 16:39:22 +00:00
|
|
|
case QUEEN : printf("queen "); break;
|
|
|
|
case KING : printf("king "); break;
|
|
|
|
case ACE : printf("ace "); break;
|
2010-04-11 20:13:06 +00:00
|
|
|
default : printf("? ");
|
2010-04-10 16:39:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
switch (card->suit) {
|
|
|
|
case NO_SUIT : printf(", no suit "); break;
|
|
|
|
case DIAMONDS: printf("of diamonds "); break;
|
|
|
|
case SPADES : printf("of spades "); break;
|
|
|
|
case HEARTS : printf("of hearts "); break;
|
|
|
|
case CLUBS : printf("of clubs "); break;
|
|
|
|
}
|
|
|
|
|
|
|
|
printf("at y:%d x:%d, ", card->frame->start_y, card->frame->start_x);
|
2010-04-10 17:40:37 +00:00
|
|
|
printf("with width:%d height:%d\n", FRAME_WIDTH, FRAME_HEIGHT);
|
2010-04-10 16:39:22 +00:00
|
|
|
|
|
|
|
return;
|
|
|
|
}
|