2025-02-01 06:40:33 -05:00
|
|
|
#ifndef _HF_TEYAKU_
|
|
|
|
#define _HF_TEYAKU_
|
|
|
|
|
2025-02-04 18:47:56 -05:00
|
|
|
#include <stdbool.h>
|
|
|
|
|
2025-02-01 06:40:33 -05:00
|
|
|
#include "card.h"
|
|
|
|
|
2025-02-01 07:04:28 -05:00
|
|
|
typedef enum SetTeyaku {
|
2025-02-01 11:23:01 -05:00
|
|
|
SET_TEYAKU_NONE,
|
2025-02-01 07:04:28 -05:00
|
|
|
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 {
|
2025-02-01 11:23:01 -05:00
|
|
|
CHAFF_TEYAKU_NONE,
|
2025-02-01 07:04:28 -05:00
|
|
|
CHAFF_TEYAKU_RED,
|
|
|
|
ONE_RIBBON,
|
|
|
|
ONE_ANIMAL,
|
|
|
|
ONE_BRIGHT,
|
|
|
|
EMPTY_HAND,
|
|
|
|
} ChaffTeyaku;
|
|
|
|
|
2025-02-01 11:23:01 -05:00
|
|
|
typedef struct Teyaku {
|
|
|
|
ChaffTeyaku chaff;
|
|
|
|
SetTeyaku set;
|
2025-02-04 18:47:56 -05:00
|
|
|
bool calculated;
|
2025-02-01 11:23:01 -05:00
|
|
|
} Teyaku;
|
|
|
|
|
|
|
|
void calculate_teyaku(const Hand h, Teyaku *t);
|
|
|
|
void teyaku_to_string(Teyaku *t, char *str);
|
2025-02-01 06:40:33 -05:00
|
|
|
|
|
|
|
#endif
|