优化机器人出牌逻辑
This commit is contained in:
parent
d7dd6050d7
commit
d687c12101
|
@ -1024,11 +1024,11 @@ func GetPressCards(cards, lastCards []int32, data *tienlenApi.PredictRequest, po
|
|||
//如果是机器人出的牌 判断出不出2
|
||||
if lastIsRobot {
|
||||
//如果上家剩余牌大于2手
|
||||
if lastHandCardnum > 1 && Value(lastCards[0]) == 2 && len(outCards) == 1 {
|
||||
if lastHandCardnum > 1 && Value(lastCards[0]) == 12 && len(outCards) == 1 && handCardnum > 2 {
|
||||
//随机概率80
|
||||
if rand.Int31n(100)+1 <= 80 {
|
||||
outCards = []int32{}
|
||||
logger.Logger.Trace("上家机器人出的牌,剩余牌大于2手,随机不出2")
|
||||
logger.Logger.Trace("上家机器人出的牌,剩余牌大于1手,随机不出2")
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1218,11 +1218,11 @@ func GetPressCards(cards, lastCards []int32, data *tienlenApi.PredictRequest, po
|
|||
//如果是机器人出的牌 判断出不出2
|
||||
if lastIsRobot {
|
||||
//如果上家剩余牌大于2手
|
||||
if lastHandCardnum > 1 && Value(lastCards[0]) == 2 && len(outCards) == 2 {
|
||||
if lastHandCardnum > 1 && Value(lastCards[0]) == 12 && len(outCards) == 2 && handCardnum > 2 {
|
||||
//随机概率80
|
||||
if rand.Int31n(100)+1 <= 80 {
|
||||
outCards = []int32{}
|
||||
logger.Logger.Trace("上家机器人出的牌,剩余牌大于2手,随机不出2")
|
||||
logger.Logger.Trace("上家机器人出的牌,剩余牌大于1手,随机不出2")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue