// Copyright 2025 Bill Rossi // // This file is part of Hanafuda Hachi-Hachi. // // Hanafuda Hachi-Hachi is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. // // Hanafuda Hachi-Hachi is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. // // You should have received a copy of the GNU General Public License along with Hanafuda Hachi-Hachi. If not, see . #ifndef _HF_TEYAKU_ #define _HF_TEYAKU_ #include #include "card.h" typedef enum SetTeyaku { SET_TEYAKU_NONE, 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, CHAFF_TEYAKU_RED, ONE_RIBBON, ONE_ANIMAL, ONE_BRIGHT, EMPTY_HAND, } ChaffTeyaku; typedef struct Teyaku { ChaffTeyaku chaff; SetTeyaku set; bool calculated; } Teyaku; int teyaku_points(Teyaku *t); void calculate_teyaku(const Hand h, Teyaku *t); void set_teyaku_to_string(Teyaku *t, char *str); void chaff_teyaku_to_string(Teyaku *t, char *str); void teyaku_to_string(Teyaku *t, char *str); #endif