# coding: utf-8

TABLE_RULE_READY = 1
TABLE_RULE_DEAL = 2
TABLE_RULE_STEP = 3
TABLE_RULE_END = 4
TABLE_RULE_SETTLE_FOR_ROUND = 5
TABLE_RULE_STEP_WITH_HAIDI = 6


PLAYER_RULE_READY = 1
PLAYER_RULE_DEAL = 2
PLAYER_RULE_DRAW = 3
PLAYER_RULE_DISCARD = 4
PLAYER_RULE_CHOW = 5
PLAYER_RULE_PONG = 6
PLAYER_RULE_KONG = 7
PLAYER_RULE_WIN = 8
PLAYER_RULE_NIAO = 9
PLAYER_RULE_KG_AFTER = 13
PLAYER_RULE_KG_SELF= 11
PLAYER_RULE_KG_OTHER= 12
PLAYER_RULE_YAO = 13

PLAYER_RULE_MOON = 14
PLAYER_RULE_TING_KONG = 15
PLAYER_RULE_CHONG_KONG = 16




PLAYER_ACTION_TYPE_CHOW = 0b0000001
PLAYER_ACTION_TYPE_PONG = 0b0000010
PLAYER_ACTION_TYPE_TING = 3
PLAYER_ACTION_TYPE_JIA = 6
PLAYER_ACTION_TYPE_KONG_CONCEALED = 0b0000100
PLAYER_ACTION_TYPE_KONG_CONCEALED_KG = 7
PLAYER_ACTION_TYPE_KONG_EXPOSED_KG = 5
PLAYER_ACTION_TYPE_KONG_PONG_KG = 9
PLAYER_ACTION_TYPE_KONG_EXPOSED = 0b0001000
PLAYER_ACTION_TYPE_KONG_PONG = 0b0010000
PLAYER_ACTION_TYPE_YAO_GANG = 0b10001
PLAYER_ACTION_TYPE_WIN_DRAW = 0b0100000
PLAYER_ACTION_TYPE_WIN_DISCARD = 0b1000000
PLAYER_ACTION_TYPE_KONG_CONCEALED_CHONG = 13
PLAYER_ACTION_TYPE_KONG_PONG_CHONG = 12

PLAYER_MSG_KANBAO = 1
PLAYER_MSG_RECONNECT = 3

# 玩家胡牌类型
PLAYER_WIN_PAO = -1
# 平局
PLAYER_WIN_TYPE_NONE = 0
# 点炮胡
PLAYER_WIN_TYPE_DISCARD = 1
# 自摸胡
PLAYER_WIN_TYPE_DRAW = 2
#杠上炮
PLAY_WIN_TYPE_GSP = 3
#抢杠胡
PLAY_WIN_QG = 4
#平胡
WIN_BASE = 5


# 桌子胡牌类型（主要影响抓鸟）
# 点炮胡（单人胡牌）
TABLE_WIN_TYPE_DISCARD_ONE = 1
# 点炮胡（多人胡牌）
TABLE_WIN_TYPE_DISCARD_MORE = 2
# 自摸胡
TABLE_WIN_TYPE_DISCARD_DRAW = 3
TABLE_WIN_TYPE_DISCARD_GSP = 4


# 配置基本分
SCORE_AN_GANG = 1       # 暗杠1嘴（不翻开）
SCORE_MING_GANG = 2     # 明杠2嘴（最后结算）
SCORE_FANG_GANG = 1
SCORE_BAO_GANG = 3
WIN_DRAW = 2
WIN_DISCARD = 2
WIN_QG = 3

SCORE_BASE = 1