移除重复代码
This commit is contained in:
parent
c214107ff3
commit
4504afde92
@ -119,10 +119,7 @@ func (this *Room) AiTimeOut(task *timewheel.Task, args ...interface{}) {
|
||||
szMap = append(szMap, m...)
|
||||
}
|
||||
this.player2.Score += curScore
|
||||
szMap = append(szMap, &pb.MapData{
|
||||
Data: this.chessboard.Plat,
|
||||
CurSocre: 0,
|
||||
})
|
||||
|
||||
// 清理旧的计时器 开启一个新的
|
||||
if this.operatetimer != nil {
|
||||
timewheel.Remove(this.operatetimer)
|
||||
@ -173,10 +170,7 @@ func (this *Room) ReceiveMessage(session comm.IUserSession, stype string, msg pr
|
||||
curScore += score
|
||||
szMap = append(szMap, m...)
|
||||
}
|
||||
szMap = append(szMap, &pb.MapData{
|
||||
Data: this.chessboard.Plat,
|
||||
CurSocre: 0,
|
||||
})
|
||||
|
||||
//this.player2.Score += curScore
|
||||
// 开启新的定时器
|
||||
if this.operatetimer != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user