#ifndef _HF_CARD_ #define _HF_CARD_ #include #include #include "move.h" typedef struct Card Card; typedef struct Hand Hand; #define CARD_WIDTH 73 #define CARD_HEIGHT 120 #define CARD_BORDER 5 typedef enum CardType { CHAFF, RIBBON, ANIMAL, BRIGHT, } CardType; typedef enum RibbonType { RIBBON_NONE, RIBBON_PLAIN, RIBBON_BLUE, RIBBON_POETRY, } RibbonType; typedef enum Month { JANUARY, FEBRUARY, MARCH, APRIL, MAY, JUNE, JULY, AUGUST, SEPTEMBER, OCTOBER, NOVEMBER, DECEMBER } Month; struct Card { int index; CardType type; RibbonType ribbon_type; Month month; Vector2 position; bool selected; bool visible; Move move; }; struct Hand { Card *cards[48]; int count; Vector2 position; }; void draw_card(Card *c, Texture2D *cards_texture); bool point_within_card(Card *c, Vector2 v); void shuffle_hand(Hand *h); void deal(Hand *from, Hand *to, int count, bool up); bool card_done_moving(Card *c); #endif