<commit_before>/*
 * Majang game algorithm library
 * This file is distributed under the BSD License.
 * Copyright (C) 2015 <NAME>(<EMAIL>)
 */
#ifndef _MAJANG_H
#define _MAJANG_H
#ifdef __cplusplus
extern "C" {
#endif

#include <stdint.h>

/*
 * 麻将常用术语
 * 顺子：由同花色三个连续的牌组成。
 * 刻子：又称“坎”，由三张或四张（又称杠子）相同的牌组成。
 * 面子：顺子和刻子的统称。
 * 将头：又称“眼”，胡牌需要的对子。
 * 胡牌：一副牌必须凑满四（五）副面子及一组将，才可以胡牌。
 * 庄家：每局掷骰子决定开牌位置的人。
 * 连庄：庄家胡牌或者流局即可连庄。
 */

/* majiang suit */
typedef enum majiang_suit {
    mjSuitNone,
	mjSuitCharacter,            /* wanzi pai */
    mjSuitWan = mjSuitCharacter,
    mjSuitBamboo,               /* tiaozi pai */
    mjSuitTiao = mjSuitBamboo,
    mjSuitSuo = mjSuitBamboo,
    mjSuitCircle,               /* tongzi pai */
    mjSuitTong = mjSuitCircle,
    mjSuitWind,                 /* feng pai */
	mjSuitFeng = mjSuitWind,
    mjSuitDragon,
	mjSuitZFB = mjSuitDragon,	/* zhong,fa,bai */
    mjSuitFlower,               /* hua pai */
    mjSuitSeason,
	mjSuitUnknow
}mjSuit;

/* majiang ordinal */
typedef enum majiang_ordinal {
    mj1 = 1,
    mj2,
    mj3,
    mj4,
    mj5,
    mj6,
    mj7,
    mj8,
    mj9
}mjOrdinal;

typedef enum majiang_wind {
    mjEast = 1,
    mjSouth,
    mjWest,
    mjNorth
}mjWind;

typedef enum majiang_dragon {
    mjRed = 1,
    mjZhong = mjRed,
    mjGreen,
    mjFa = mjGreen,
    mjWhite,
    mjBai = mjWhite
}mjDragon;

typedef enum majiang_flower {
    mjPlum = 1,
    mjMei = mjPlum,
    mjOrchid,
    mjLan = mjOrchid,
    mjChrysan,
    mjJu = mjChrysan,
    mjBamboo,
    mjZhu = mjBamboo
}mjFlower;

typedef enum majiang_season {
    mjSpring = 1,
    mjCun = mjSpring,
    mjSummer,
    mjXia = mjSummer,
    mjAutumn,
    mjQiu = mjAutumn,
    mjWinter,
    mjDong = mjWinter
}mjSeason;

/* 面子类型 */
typedef enum mj_meld_type {
    mjMeldNone,
    mjMeldKe,       /* 刻子 */
    mjMeldShun,     /* 顺子 */
    mjMeldJiang,    /* 将牌(对子) */
    mjMeldChi,      /* 吃获取的顺子 */
    mjMeldPeng,     /* 碰获取的刻子 */
    mjMeldGang,     /* 杠 */
    mjMeldAngang    /* 暗杠 */
}mjMeldType;

/* a mj pai */
typedef struct mjpai_s {
    int suit;   /* suit */
    int sign;   /* sign */
}mjpai_t;<commit_msg>rename<commit_after>/*
 * Majang game algorithm library
 * This file is distributed under the BSD License.
 * Copyright (C) 2015 <NAME>(<EMAIL>)
 */
#ifndef _MAJANG_H
#define _MAJANG_H
#ifdef __cplusplus
extern "C" {
#endif

#include <stdint.h>

/*
 * 麻将常用术语
 * 顺子：由同花色三个连续的牌组成。
 * 刻子：又称“坎”，由三张或四张（又称杠子）相同的牌组成。
 * 面子：顺子和刻子的统称。
 * 将头：又称“眼”，胡牌需要的对子。
 * 胡牌：一副牌必须凑满四（五）副面子及一组将，才可以胡牌。
 * 庄家：每局掷骰子决定开牌位置的人。
 * 连庄：庄家胡牌或者流局即可连庄。
 */

/* majiang tile suit */
typedef enum majiang_suit {
    mjSuitNone,
	mjSuitWan,                      /* 万子 */
    mjSuitCharacters = mjSuitWan,
    mjSuitTiao,                     /* 条子 */
    mjSuitSuo = mjSuitTiao,
    mjSuitBamboo = mjSuitTiao,
    mjSuitTong,                     /* 筒子 */
    mjSuitDots = mjSuitTong,
    mjSuitFeng,                     /* 风牌 */
	mjSuitWind = mjSuitFeng,
    mjSuitZFB,                      /* 中发白 */
	mjSuitDragon = mjSuitZFB,
    mjSuitHua,                      /* 花牌 */
    mjSuitFlower = mjSuitHua,
    mjSuitSeason,
	mjSuitUnknow
}mjSuit;

/* majiang ordinal */
typedef enum majiang_ordinal {
    mj1 = 1,
    mj2,
    mj3,
    mj4,
    mj5,
    mj6,
    mj7,
    mj8,
    mj9
}mjOrdinal;

typedef enum majiang_wind {
    mjEast = 1,
    mjSouth,
    mjWest,
    mjNorth
}mjWind;

typedef enum majiang_dragon {
    mjZhong = 1,
    mjRed = mjZhong,
    mjFa,
    mjGreen = mjFa,
    mjBai,
    mjWhite = mjBai
}mjDragon;

typedef enum majiang_flower {
    mjMei = 1,
    mjPlum = mjMei,
    mjLan,
    mjOrchid = mjLan,
    mjJu,
    mjChrysan = mjJu,
    mjZhu,
    mjBamboo = mjZhu
}mjFlower;

typedef enum majiang_season {
    mjCun = 1,
    mjSpring = mjCun,
    mjXia,
    mjSummer = mjXia,
    mjQiu,
    mjAutumn = mjQiu,
    mjDong,
    mjWinter = mjDong
}mjSeason;

/* 面子类型 */
typedef enum mj_meld_type {
    mjMeldNone,
    mjMeldKe,       /* 刻子 */
    mjMeldShun,     /* 顺子 */
    mjMeldJiang,    /* 将牌(对子) */
    mjMeldChi,      /* 吃获取的顺子 */
    mjMeldPeng,     /* 碰获取的刻子 */
    mjMeldGang,     /* 杠 */
    mjMeldAngang    /* 暗杠 */
}mjMeldType;

/* a mj pai */
typedef struct mjpai_s {
    int id;     /* start with 1 */
    int suit;   /* suit */
    int sign;   /* sign */
}mjpai_t;
{'fraction_non_alphanumeric': 0.11555452220413857, 'fraction_numerical': 0.008602650546384562, 'mean_word_length': 2.0882986360373295, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2380440', 'n_tokens_mistral': 2290, 'n_tokens_neox': 2155, 'n_words': 362}