diff --git a/modules/entertainment/room.go b/modules/entertainment/room.go index 446643c55..f77512152 100644 --- a/modules/entertainment/room.go +++ b/modules/entertainment/room.go @@ -55,7 +55,7 @@ func (this *Room) RandomPlayType() (itype int32) { weight = append(weight, v.Weight) } itype = list[comm.GetRandW(weight)].Key - itype = 3 + return } @@ -146,17 +146,7 @@ func (this *Room) AiOperator() { this.player2.Energy += v.CurEnergy v.CurEnergy = this.player2.Energy } - // for _, v := range szMap { // - // fmt.Printf("================\n") - // var v1 int - // for index := Width - 1; index >= 0; index-- { - // for j := 0; j < Height; j++ { - // v1 = index + j*7 - // fmt.Printf("%d:%d ", v1, v.Data[v1].Cid) - // } - // fmt.Printf("\n") - // } - // } + // 广播消息 if err := this.module.SendMsgSyncToSession(string(this.module.GetType()), "operatorrst", &pb.EntertainOperatorRstPush{ Mpadata: szMap, @@ -392,17 +382,6 @@ func (this *Room) ReceiveMessage(session comm.IUserSession, stype string, msg pr this.round++ } - // for _, v := range szMap { // - // fmt.Printf("================\n") - // var v1 int - // for index := Width - 1; index >= 0; index-- { - // for j := 0; j < Height; j++ { - // v1 = index + j*7 - // fmt.Printf("%d:%d ", v1, v.Data[v1].Cid) - // } - // fmt.Printf("\n") - // } - // } // 广播消息 if err := this.module.SendMsgSyncToSession(string(this.module.GetType()), "operatorrst", &pb.EntertainOperatorRstPush{ Mpadata: szMap,