测试优化
This commit is contained in:
parent
d675f2099e
commit
4202883df2
@ -145,13 +145,6 @@ func (this *Room) AiOperator() {
|
||||
this.player2.Ps--
|
||||
// 交换元素
|
||||
szMap, oid1, oid2, bAddPs = this.chessboard.AiSwapGirde()
|
||||
for _, v := range szMap { //
|
||||
this.player2.Energy += v.CurEnergy
|
||||
v.CurEnergy = this.player2.Energy
|
||||
curScore += v.CurSocre
|
||||
this.player2.Score += v.CurSocre
|
||||
v.CurSocre = this.player2.Score
|
||||
}
|
||||
|
||||
if bAddPs {
|
||||
this.player2.Ps++
|
||||
@ -165,7 +158,7 @@ func (this *Room) AiOperator() {
|
||||
this.round++
|
||||
}
|
||||
// 校验下次是不是消除
|
||||
if this.chessboard.CheckAndRefreshPlat() {
|
||||
if !this.chessboard.CheckAndRefreshPlat() {
|
||||
this.chessboard.RedsetPlatData()
|
||||
szMap = append(szMap, &pb.MapData{
|
||||
Data: this.chessboard.GetPalatData(),
|
||||
@ -342,7 +335,7 @@ func (this *Room) ReceiveMessage(session comm.IUserSession, stype string, msg pr
|
||||
}
|
||||
|
||||
// 校验下次是不是消除
|
||||
if this.chessboard.CheckAndRefreshPlat() {
|
||||
if !this.chessboard.CheckAndRefreshPlat() {
|
||||
this.chessboard.RedsetPlatData()
|
||||
szMap = append(szMap, &pb.MapData{
|
||||
Data: this.chessboard.GetPalatData(),
|
||||
|
@ -525,7 +525,9 @@ func (this *MapData) SkillUp(color int32, skillid int32, value int32, bDrop bool
|
||||
CurSocre: skillScore,
|
||||
CurEnergy: skillEnergy,
|
||||
})
|
||||
szMap, _ = this.CheckMap(1, false)
|
||||
if list, _ := this.CheckMap(color, false); len(list) > 0 {
|
||||
szMap = append(szMap, list...)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user