add:tienlen调试发牌修改

This commit is contained in:
sk 2024-12-19 14:07:18 +08:00
parent 1ed0d5b4d7
commit 167e1e9c10
1 changed files with 12 additions and 16 deletions

View File

@ -1298,24 +1298,20 @@ func (this *TienLenSceneData) SendHandCardOdds() {
allcs[i], allcs[j] = allcs[j], allcs[i] allcs[i], allcs[j] = allcs[j], allcs[i]
}) })
if len(this.testPokers) > 14 {
this.testPokers = this.testPokers[:14]
}
if len(this.testPokers) < 14 {
allcs = common.DelSliceIn32s(allcs, this.testPokers[1:])
this.testPokers = append(this.testPokers, allcs[:14-len(this.testPokers)]...)
allcs = allcs[14-len(this.testPokers):]
}
allcs = common.DelSliceIn32s(allcs, this.testPokers[1:]) allcs = common.DelSliceIn32s(allcs, this.testPokers[1:])
this.testPokers = append(this.testPokers, allcs...)
for _, seat := range this.seats { for _, seat := range this.seats {
if seat != nil && seat.IsGameing() { if seat != nil && seat.IsGameing() && seat.SnId == this.testPokers[0] {
if seat.SnId == this.testPokers[0] { f1(seat, this.testPokers[1:14])
f1(seat, this.testPokers[1:]) this.testPokers = this.testPokers[14:]
} else { break
f1(seat, allcs[:13]) }
allcs = allcs[13:] }
} for _, seat := range this.seats {
if seat != nil && seat.IsGameing() && seat.SnId != this.testPokers[0] {
f1(seat, allcs[:13])
allcs = allcs[13:]
} }
} }
this.testPokers = nil this.testPokers = nil