hanafuda/dekiyaku.h

38 lines
691 B
C
Raw Normal View History

2025-02-01 11:05:46 -05:00
#ifndef _HF_DEKIYAKU_
#define _HF_DEKIYAKU_
#include "card.h"
2025-02-16 20:50:13 -05:00
typedef enum DekiyakuAction {
DEKIYAKU_ACTION_NONE,
DEKIYAKU_ACTION_SAGE,
DEKIYAKU_ACTION_SHOUBU,
} DekiyakuAction;
2025-02-01 11:05:46 -05:00
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;
2025-02-16 20:50:13 -05:00
void calculate_dekiyaku(Hand *h, Dekiyaku *d);
2025-02-01 11:05:46 -05:00
char *meld_name(DekiyakuMeldType d);
void dekiyaku_to_string(Dekiyaku *d, char *str);
2025-02-16 20:50:13 -05:00
int dekiyaku_score(Dekiyaku *d);
2025-02-01 11:05:46 -05:00
#endif