This commit is contained in:
meixiongfeng 2023-11-08 11:06:58 +08:00
parent 0269d5ba8e
commit 67e4b39a78

View File

@ -139,13 +139,13 @@ func (this *Room) AiOperator() {
ChangeType: 1, ChangeType: 1,
}) })
} }
// for _, v := range szMap { // for _, v := range szMap { //
// curScore += v.CurSocre curScore += v.CurSocre
// this.player2.Score += v.CurSocre this.player2.Score += v.CurSocre
// v.CurSocre = this.player2.Score v.CurSocre = this.player2.Score
// this.player2.Energy += v.CurEnergy this.player2.Energy += v.CurEnergy
// v.CurEnergy = this.player2.Energy v.CurEnergy = this.player2.Energy
// } }
// 广播消息 // 广播消息
if err := this.module.SendMsgSyncToSession(string(this.module.GetType()), "operatorrst", &pb.EntertainOperatorRstPush{ if err := this.module.SendMsgSyncToSession(string(this.module.GetType()), "operatorrst", &pb.EntertainOperatorRstPush{
Mpadata: szMap, Mpadata: szMap,
@ -381,18 +381,18 @@ func (this *Room) ReceiveMessage(session comm.IUserSession, stype string, msg pr
this.round++ this.round++
} }
for _, v := range szMap { // // for _, v := range szMap { //
fmt.Printf("================\n") // fmt.Printf("================\n")
var v1 int // var v1 int
for index := Width - 1; index >= 0; index-- { // for index := Width - 1; index >= 0; index-- {
for j := 0; j < Height; j++ { // for j := 0; j < Height; j++ {
v1 = index + j*7 // v1 = index + j*7
fmt.Printf("%d ", v.Data[v1].Cid) // fmt.Printf("%d ", v.Data[v1].Cid)
} // }
fmt.Printf("\n") // fmt.Printf("\n")
} // }
} // }
// 广播消息 // 广播消息
if err := this.module.SendMsgSyncToSession(string(this.module.GetType()), "operatorrst", &pb.EntertainOperatorRstPush{ if err := this.module.SendMsgSyncToSession(string(this.module.GetType()), "operatorrst", &pb.EntertainOperatorRstPush{
Mpadata: szMap, Mpadata: szMap,