package tienlen import "time" //////////////////////////////////////////////////////////////////////////////// //tienlen //////////////////////////////////////////////////////////////////////////////// const ( TestOpen bool = false //测试开关 MaxNumOfPlayer int = 4 //最多人数 HandCardNum int32 = 13 //手牌数量 InvalideCard int32 = -1 //默认牌 InvalidePos int32 = -1 RobotGameTimesMin int32 = 5 //机器人参与游戏次数下限 RobotGameTimesMax int32 = 5 //机器人参与游戏次数上限 DelayCanOp int = 3 //根据上家牌型额外延迟下家出牌时间 RankBaseScore int64 = 10 // 排位基础分 RankBaseScoreToEnd int64 = 100 // 排位打到底基础分 RankType = 1 // 排位类型,表示tienlen游戏 ) const ( TienLenWaitPlayerTimeout = time.Second * 1 TienLenWaitStartTimeout = time.Second * 10 //人数够开启游戏, 延迟X秒开始游戏 TienLenHandCardTimeout = time.Second * 3 //发牌 TienLenPlayerOpTimeout = time.Second * 15 //出牌(玩家操作阶段) TienLenBilledTimeout = time.Second * 5 //结算 TIenLenTianhuTimeout = time.Second * 2 // 天胡动画时长 TienLenHandNotExceedTimeLimit = time.Second * 3 //玩家没有牌可以接上家的牌,出牌时间上限 TienLenHandAutoStateTimeOut = time.Second * 1 //玩家托管出牌时间上限 TienLenCustomWaiteStatTimeout = time.Millisecond * 1500 ) // 场景状态 const ( TienLenSceneStateWaitPlayer int = iota //0 人数不够开启游戏,等待玩家上线 TienLenSceneStateWaitStart //1 人数够开启游戏, 延迟X秒开始游戏 TienLenSceneStateHandCard //2 发牌 TienLenSceneStatePlayerOp //3 出牌(玩家操作阶段) TienLenSceneStateBilled //4 结算 TienLenSceneStateMax ) // 玩家操作 const ( TienLenPlayerOpNull int32 = iota //0,初始值 TienLenPlayerOpPlay //1,出牌 TienLenPlayerOpPass //2,过牌 TienLenPlayerOpStart //3,房主开始游戏 TienLenPlayerOpTest //4,调试发牌,发指定的牌 TienLenPlayerOpAutoHandCard //5,托管状态下出牌 TienLenPlayerOpCanelAuto //6,取消托管状态 TienLenPlayerClientHintCards //7,客户端提示出牌 ) type ThingLongTime struct { Min int32 Max int32 Time time.Duration } var Think_Long_Sct_MAP = map[int]int{ 1: 10, 2: 10, 3: 7, 4: 7, } var ( ThinkLongSct = []ThingLongTime{ ThingLongTime{0, 1, 15 * time.Second}, ThingLongTime{2, 3, 10 * time.Second}, ThingLongTime{4, 999999, 7 * time.Second}, } ) const ( TianHu2Four = 1 // 4个2 TianHu6StraightTwin = 2 // 6连对 TianHu12Straight = 3 // 12顺 ) const ( StaticsTianHuTimes = "tienlen_tianhu_times" )