hanafuda/dekiyaku.h
2025-02-02 05:04:19 -05:00

31 lines
540 B
C

#ifndef _HF_DEKIYAKU_
#define _HF_DEKIYAKU_
#include "card.h"
typedef enum DekiyakuMeldType {
NONE,
FIVE_BRIGHTS,
FOUR_BRIGHTS,
SEVEN_RIBBONS,
POETRY_RIBBONS,
BLUE_RIBBONS,
BOAR_DEER_BUTTERFLIES,
} DekiyakuMeldType;
typedef struct DekiyakuMeld {
DekiyakuMeldType type;
int value;
} DekiyakuMeld;
typedef struct Dekiyaku {
DekiyakuMeld meld[5];
int count;
} Dekiyaku;
void calculate_dekiyaku(const Hand h, Dekiyaku *d);
char *meld_name(DekiyakuMeldType d);
void dekiyaku_to_string(Dekiyaku *d, char *str);
#endif