hanafuda/teyaku.h
2025-02-01 08:28:52 -05:00

38 lines
714 B
C

#ifndef _HF_TEYAKU_
#define _HF_TEYAKU_
#include "card.h"
typedef enum SetTeyaku {
SET_TEYAKU_NONE = 0,
TRIPLET,
STANDING_TRIPLET,
TWO_TRIPLETS,
TRIPLET_AND_STANDING_TRIPLET,
TWO_STANDING_TRIPLETS,
THREE_PAIRS,
FOUR_OF_A_KIND,
TRIPLET_AND_TWO_PAIRS,
ONE_TWO_FOUR,
FOUR_THREE,
} SetTeyaku;
typedef enum ChaffTeyaku {
CHAFF_TEYAKU_NONE = 0,
CHAFF_TEYAKU_RED,
ONE_RIBBON,
ONE_ANIMAL,
ONE_BRIGHT,
EMPTY_HAND,
} ChaffTeyaku;
int calculate_teyaku(Hand h);
SetTeyaku calculate_set_teyaku(Hand h);
ChaffTeyaku calculate_chaff_teyaku(Hand h);
char *set_teyaku_english(Hand h);
char *chaff_teyaku_english(Hand h);
int set_teyaku_points(Hand h);
int chaff_teyaku_points(Hand h);
#endif