优化机器人出牌逻辑

This commit is contained in:
by 2025-02-12 16:38:48 +08:00
parent d7dd6050d7
commit d687c12101
1 changed files with 4 additions and 4 deletions

View File

@ -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")
}
}
}