From d7f349a82c95f63076f1db178bf655c5fd9848bd Mon Sep 17 00:00:00 2001 From: Murilo Soares Pereira Date: Sat, 10 Apr 2010 00:45:54 -0300 Subject: [PATCH] Added functions to cover and expose cards. --- lib/card.c | 12 ++++++++++++ lib/card.h | 2 ++ 2 files changed, 14 insertions(+) diff --git a/lib/card.c b/lib/card.c index d44c1ca..573e23e 100644 --- a/lib/card.c +++ b/lib/card.c @@ -39,3 +39,15 @@ void set_card(struct card *card, return; } + +void expose_card(struct card *card) { + card->face = EXPOSED; + + return; +} + +void cover_card(struct card *card) { + card->face = COVERED; + + return; +} diff --git a/lib/card.h b/lib/card.h index 4819665..7398c6a 100644 --- a/lib/card.h +++ b/lib/card.h @@ -45,5 +45,7 @@ void allocate_card(struct card **); void initialize_card(struct card *); void delete_card(struct card *); void set_card(struct card *, enum value, enum suit, enum face, int, int); +void expose_card(struct card *); +void cover_card(struct card *); #endif