38 lines
691 B
C
38 lines
691 B
C
#ifndef _HF_DEKIYAKU_
|
|
#define _HF_DEKIYAKU_
|
|
|
|
#include "card.h"
|
|
|
|
typedef enum DekiyakuAction {
|
|
DEKIYAKU_ACTION_NONE,
|
|
DEKIYAKU_ACTION_SAGE,
|
|
DEKIYAKU_ACTION_SHOUBU,
|
|
} DekiyakuAction;
|
|
|
|
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(Hand *h, Dekiyaku *d);
|
|
char *meld_name(DekiyakuMeldType d);
|
|
void dekiyaku_to_string(Dekiyaku *d, char *str);
|
|
int dekiyaku_score(Dekiyaku *d);
|
|
|
|
#endif
|