Merge branch 'dev' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev
This commit is contained in:
commit
f7ac90a153
@ -27,38 +27,48 @@ type Room struct {
|
|||||||
player2 *pb.PlayerData // 玩家2
|
player2 *pb.PlayerData // 玩家2
|
||||||
chessboard *MapData
|
chessboard *MapData
|
||||||
module *Entertainment
|
module *Entertainment
|
||||||
power string // 谁的权限
|
|
||||||
round int32 // 轮数
|
round int32 // 轮数
|
||||||
operatetimer *timewheel.Task //操作倒计时定时器
|
operatetimer *timewheel.Task //操作倒计时定时器
|
||||||
aiTimer *timewheel.Task //AI操作随机做个延时
|
aiTimer *timewheel.Task //AI操作随机做个延时
|
||||||
|
curPower string // 当前操作的玩家
|
||||||
|
NexPower string // 下一个操作的玩家
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *Room) operateTimeOut(task *timewheel.Task, args ...interface{}) {
|
func (this *Room) operateTimeOut(task *timewheel.Task, args ...interface{}) {
|
||||||
if this.operatetimer != nil {
|
|
||||||
timewheel.Remove(this.operatetimer)
|
if this.player1.Uid == this.curPower { // 给玩家2
|
||||||
}
|
this.player1.Ps--
|
||||||
if this.player1.Uid == this.power { // 给玩家2
|
if this.player1.Ps <= 0 { // 体力消耗完权限给下一个人
|
||||||
this.power = this.player2.Uid
|
this.NexPower = this.player2.Uid
|
||||||
this.player2.Ps = MaxPs // 恢复体力
|
this.player2.Ps = MaxPs // 恢复体力
|
||||||
|
}
|
||||||
} else { // 权限给1号玩家
|
} else { // 权限给1号玩家
|
||||||
this.power = this.player1.Uid
|
this.player2.Ps--
|
||||||
|
if this.player2.Ps <= 0 {
|
||||||
|
this.curPower = this.player1.Uid
|
||||||
this.player1.Ps = MaxPs // 恢复体力
|
this.player1.Ps = MaxPs // 恢复体力
|
||||||
}
|
}
|
||||||
this.round++ // 回合+1
|
}
|
||||||
|
if this.curPower != this.NexPower { // 变更权限的适合
|
||||||
if this.round > MaxRound*2 { // 游戏结束
|
this.round++
|
||||||
|
if this.operatetimer != nil {
|
||||||
|
timewheel.Remove(this.operatetimer)
|
||||||
|
} // 回合+1
|
||||||
|
this.operatetimer = timewheel.Add(time.Second*MaxTime, this.operateTimeOut) // 开启新的定时器
|
||||||
|
}
|
||||||
|
if this.round > MaxRound { // 游戏结束
|
||||||
this.GameOver()
|
this.GameOver()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.operatetimer = timewheel.Add(time.Second*MaxTime, this.operateTimeOut) // 开启新的定时器
|
|
||||||
var szMap []*pb.MapData
|
var szMap []*pb.MapData
|
||||||
szMap = append(szMap, &pb.MapData{
|
szMap = append(szMap, &pb.MapData{
|
||||||
Data: this.chessboard.Plat,
|
Data: this.chessboard.Plat,
|
||||||
})
|
})
|
||||||
//this.module.Debugf("超时%d", configure.Now().Unix())
|
|
||||||
if err := this.module.SendMsgToSession(string(this.module.GetType()), "operatorrst", &pb.EntertainOperatorRstPush{
|
if err := this.module.SendMsgToSession(string(this.module.GetType()), "operatorrst", &pb.EntertainOperatorRstPush{
|
||||||
Mpadata: szMap,
|
Mpadata: szMap,
|
||||||
Power: this.power,
|
Power: this.NexPower,
|
||||||
|
Curpower: this.curPower,
|
||||||
Score: 0,
|
Score: 0,
|
||||||
Round: this.round,
|
Round: this.round,
|
||||||
User1: this.player1,
|
User1: this.player1,
|
||||||
@ -66,6 +76,8 @@ func (this *Room) operateTimeOut(task *timewheel.Task, args ...interface{}) {
|
|||||||
}, this.szSession...); err != nil {
|
}, this.szSession...); err != nil {
|
||||||
this.Errorln(err)
|
this.Errorln(err)
|
||||||
}
|
}
|
||||||
|
// 变更权限
|
||||||
|
this.curPower = this.NexPower
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *Room) InitRoom(module *Entertainment, s1 comm.IUserSession, s2 comm.IUserSession, p1 *pb.PlayerData, p2 *pb.PlayerData) *Room {
|
func (this *Room) InitRoom(module *Entertainment, s1 comm.IUserSession, s2 comm.IUserSession, p1 *pb.PlayerData, p2 *pb.PlayerData) *Room {
|
||||||
@ -84,7 +96,7 @@ func (this *Room) InitRoom(module *Entertainment, s1 comm.IUserSession, s2 comm.
|
|||||||
player2: p2,
|
player2: p2,
|
||||||
chessboard: this.chessboard,
|
chessboard: this.chessboard,
|
||||||
module: module,
|
module: module,
|
||||||
power: s1.GetUserId(),
|
curPower: s1.GetUserId(),
|
||||||
round: 1,
|
round: 1,
|
||||||
szSession: this.szSession,
|
szSession: this.szSession,
|
||||||
}
|
}
|
||||||
@ -100,8 +112,7 @@ func (this *Room) AiTimeOut(task *timewheel.Task, args ...interface{}) {
|
|||||||
this.module.Debugf("AI 操作\n")
|
this.module.Debugf("AI 操作\n")
|
||||||
this.player2.Ps--
|
this.player2.Ps--
|
||||||
if this.player2.Ps <= 0 { // 权限给下一个人
|
if this.player2.Ps <= 0 { // 权限给下一个人
|
||||||
this.power = this.player1.Uid
|
this.NexPower = this.player1.Uid
|
||||||
this.round++
|
|
||||||
}
|
}
|
||||||
this.player1.Ps = MaxPs
|
this.player1.Ps = MaxPs
|
||||||
if this.aiTimer != nil {
|
if this.aiTimer != nil {
|
||||||
@ -109,26 +120,30 @@ func (this *Room) AiTimeOut(task *timewheel.Task, args ...interface{}) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 交换元素
|
// 交换元素
|
||||||
bSwap := this.chessboard.AiSwapGirde() // 交换格子
|
if bSwap, m := this.chessboard.AiSwapGirde(); bSwap {
|
||||||
if !bSwap {
|
|
||||||
this.module.Errorf("AiSwapGirde fialed")
|
|
||||||
}
|
|
||||||
|
|
||||||
if score, m, _ := this.chessboard.CheckMap(2); score > 0 {
|
|
||||||
curScore += score
|
|
||||||
szMap = append(szMap, m...)
|
szMap = append(szMap, m...)
|
||||||
}
|
}
|
||||||
this.player2.Score += curScore
|
|
||||||
|
|
||||||
|
if this.NexPower != this.curPower {
|
||||||
// 清理旧的计时器 开启一个新的
|
// 清理旧的计时器 开启一个新的
|
||||||
if this.operatetimer != nil {
|
if this.operatetimer != nil {
|
||||||
timewheel.Remove(this.operatetimer)
|
timewheel.Remove(this.operatetimer)
|
||||||
}
|
}
|
||||||
this.operatetimer = timewheel.Add(time.Second*MaxTime, this.operateTimeOut) // 开启新的定时器
|
this.operatetimer = timewheel.Add(time.Second*MaxTime, this.operateTimeOut) // 开启新的定时器
|
||||||
|
|
||||||
|
this.round++
|
||||||
|
if this.round > MaxRound { // 游戏结束
|
||||||
|
this.GameOver()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
this.player2.Score += curScore
|
||||||
|
|
||||||
// 广播消息
|
// 广播消息
|
||||||
if err := this.module.SendMsgToSession(string(this.module.GetType()), "operatorrst", &pb.EntertainOperatorRstPush{
|
if err := this.module.SendMsgToSession(string(this.module.GetType()), "operatorrst", &pb.EntertainOperatorRstPush{
|
||||||
Mpadata: szMap,
|
Mpadata: szMap,
|
||||||
Power: this.power,
|
Power: this.curPower,
|
||||||
Score: curScore,
|
Score: curScore,
|
||||||
Round: this.round,
|
Round: this.round,
|
||||||
User1: this.player1,
|
User1: this.player1,
|
||||||
@ -147,16 +162,14 @@ func (this *Room) ReceiveMessage(session comm.IUserSession, stype string, msg pr
|
|||||||
var szMap []*pb.MapData
|
var szMap []*pb.MapData
|
||||||
req := msg.(*pb.EntertainOperatorReq)
|
req := msg.(*pb.EntertainOperatorReq)
|
||||||
|
|
||||||
if session.GetUserId() != this.power { // 校验是不是你的权限
|
if session.GetUserId() != this.curPower { // 校验是不是你的权限
|
||||||
errdata = &pb.ErrorData{
|
errdata = &pb.ErrorData{
|
||||||
Code: pb.ErrorCode_EntertainNoPower,
|
Code: pb.ErrorCode_EntertainNoPower,
|
||||||
Title: pb.ErrorCode_EntertainNoPower.ToString(),
|
Title: pb.ErrorCode_EntertainNoPower.ToString(),
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if this.operatetimer != nil {
|
|
||||||
timewheel.Remove(this.operatetimer)
|
|
||||||
}
|
|
||||||
// 交换元素
|
// 交换元素
|
||||||
if b, _ := this.chessboard.SwapGirde(req.Curid, req.Targetid, 1); !b { // 交换格子
|
if b, _ := this.chessboard.SwapGirde(req.Curid, req.Targetid, 1); !b { // 交换格子
|
||||||
errdata = &pb.ErrorData{
|
errdata = &pb.ErrorData{
|
||||||
@ -173,17 +186,13 @@ func (this *Room) ReceiveMessage(session comm.IUserSession, stype string, msg pr
|
|||||||
|
|
||||||
//this.player2.Score += curScore
|
//this.player2.Score += curScore
|
||||||
// 开启新的定时器
|
// 开启新的定时器
|
||||||
if this.operatetimer != nil {
|
|
||||||
timewheel.Remove(this.operatetimer)
|
|
||||||
}
|
|
||||||
this.operatetimer = timewheel.Add(time.Second*MaxTime, this.operateTimeOut) // 开启新的定时器
|
|
||||||
|
|
||||||
if this.power == this.player1.Uid { //权限校验
|
if this.NexPower == this.player1.Uid { //权限校验
|
||||||
this.player1.Score += curScore
|
this.player1.Score += curScore
|
||||||
this.player1.Ps--
|
this.player1.Ps--
|
||||||
if this.player1.Ps <= 0 { // 权限给下一个人
|
if this.player1.Ps <= 0 { // 权限给下一个人
|
||||||
this.power = this.player2.Uid
|
this.NexPower = this.player2.Uid
|
||||||
|
this.curPower = this.player1.Uid
|
||||||
if len(this.szSession) == 1 { // 校验2号玩家是不是AI
|
if len(this.szSession) == 1 { // 校验2号玩家是不是AI
|
||||||
// 起一个定时器
|
// 起一个定时器
|
||||||
if this.aiTimer != nil {
|
if this.aiTimer != nil {
|
||||||
@ -191,25 +200,36 @@ func (this *Room) ReceiveMessage(session comm.IUserSession, stype string, msg pr
|
|||||||
}
|
}
|
||||||
this.aiTimer = timewheel.Add(time.Second*AITime, this.AiTimeOut)
|
this.aiTimer = timewheel.Add(time.Second*AITime, this.AiTimeOut)
|
||||||
}
|
}
|
||||||
this.round++
|
|
||||||
}
|
}
|
||||||
this.player2.Ps = MaxPs
|
this.player2.Ps = MaxPs
|
||||||
} else if this.power == this.player2.Uid {
|
} else if this.NexPower == this.player2.Uid {
|
||||||
this.player2.Score += curScore
|
this.player2.Score += curScore
|
||||||
this.player2.Ps--
|
this.player2.Ps--
|
||||||
if this.player2.Ps <= 0 { // 权限给下一个人
|
if this.player2.Ps <= 0 { // 权限给下一个人
|
||||||
this.power = this.player1.Uid
|
this.NexPower = this.player1.Uid
|
||||||
this.round++
|
this.curPower = this.player2.Uid //当前操作的玩家
|
||||||
}
|
}
|
||||||
this.player1.Ps = MaxPs
|
this.player1.Ps = MaxPs
|
||||||
} else { // err 未知权限
|
} else { // err 未知权限
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if this.NexPower == this.curPower {
|
||||||
|
this.round++
|
||||||
|
if this.operatetimer != nil {
|
||||||
|
timewheel.Remove(this.operatetimer)
|
||||||
|
this.operatetimer = timewheel.Add(time.Second*MaxTime, this.operateTimeOut) // 开启新的定时器
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if this.round > MaxRound { // 游戏结束
|
||||||
|
this.GameOver()
|
||||||
|
return
|
||||||
|
}
|
||||||
// 广播消息
|
// 广播消息
|
||||||
if err := this.module.SendMsgToSession(string(this.module.GetType()), "operatorrst", &pb.EntertainOperatorRstPush{
|
if err := this.module.SendMsgToSession(string(this.module.GetType()), "operatorrst", &pb.EntertainOperatorRstPush{
|
||||||
Mpadata: szMap,
|
Mpadata: szMap,
|
||||||
Power: this.power,
|
Power: this.curPower,
|
||||||
|
Curpower: this.NexPower,
|
||||||
Score: curScore,
|
Score: curScore,
|
||||||
Round: this.round,
|
Round: this.round,
|
||||||
User1: this.player1,
|
User1: this.player1,
|
||||||
@ -217,44 +237,32 @@ func (this *Room) ReceiveMessage(session comm.IUserSession, stype string, msg pr
|
|||||||
}, this.szSession...); err != nil {
|
}, this.szSession...); err != nil {
|
||||||
this.Errorln(err)
|
this.Errorln(err)
|
||||||
}
|
}
|
||||||
|
// 变更权限
|
||||||
|
this.curPower = this.NexPower
|
||||||
case "ready":
|
case "ready":
|
||||||
if len(this.szSession) == 1 { // AI对战的话直接开始游戏
|
if len(this.szSession) == 1 { // AI对战的话直接开始游戏
|
||||||
|
this.NexPower = this.player1.Uid
|
||||||
|
this.curPower = this.player1.Uid
|
||||||
|
this.player1.Ps = MaxPs
|
||||||
|
this.player2.Ps = MaxPs
|
||||||
if err := this.module.SendMsgToSession(string(this.module.GetType()), "startgame", &pb.EntertainStartGamePush{
|
if err := this.module.SendMsgToSession(string(this.module.GetType()), "startgame", &pb.EntertainStartGamePush{
|
||||||
User1: this.player1,
|
User1: this.player1,
|
||||||
User2: this.player2,
|
User2: this.player2,
|
||||||
Mpadata: &pb.MapData{
|
Mpadata: &pb.MapData{Data: this.chessboard.Plat},
|
||||||
Data: this.chessboard.Plat,
|
Power: this.NexPower,
|
||||||
},
|
|
||||||
Power: this.power,
|
|
||||||
Round: this.round,
|
Round: this.round,
|
||||||
|
Roomid: "",
|
||||||
}, this.szSession...); err != nil {
|
}, this.szSession...); err != nil {
|
||||||
this.Errorln(err)
|
this.Errorln(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
this.operatetimer = timewheel.Add(time.Second*MaxTime, this.operateTimeOut)
|
this.operatetimer = timewheel.Add(time.Second*MaxTime, this.operateTimeOut)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *Room) StartGame() (errdata *pb.ErrorData) {
|
|
||||||
|
|
||||||
if err := this.module.SendMsgToSession(string(this.module.GetType()), "startgame", &pb.EntertainStartGamePush{
|
|
||||||
User1: this.player1,
|
|
||||||
User2: this.player2,
|
|
||||||
Mpadata: &pb.MapData{
|
|
||||||
Data: this.chessboard.Plat,
|
|
||||||
},
|
|
||||||
Power: this.power,
|
|
||||||
Round: this.round,
|
|
||||||
}, this.szSession...); err != nil {
|
|
||||||
this.Errorln(err)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// 游戏结束
|
// 游戏结束
|
||||||
func (this *Room) GameOver() (errdata *pb.ErrorData) {
|
func (this *Room) GameOver() (errdata *pb.ErrorData) {
|
||||||
if this.aiTimer != nil {
|
if this.aiTimer != nil {
|
||||||
|
@ -30,6 +30,7 @@ type MapData struct {
|
|||||||
Plat []*pb.GirdeData // 地图
|
Plat []*pb.GirdeData // 地图
|
||||||
oid int32 // 唯一id
|
oid int32 // 唯一id
|
||||||
module *Entertainment
|
module *Entertainment
|
||||||
|
operElem []int32 // 当前移动的元素
|
||||||
}
|
}
|
||||||
|
|
||||||
// 1~6随机一个数
|
// 1~6随机一个数
|
||||||
@ -64,8 +65,8 @@ func (this *MapData) InitMap(module *Entertainment) {
|
|||||||
|
|
||||||
// 交换2个元素(参数 oid )
|
// 交换2个元素(参数 oid )
|
||||||
func (this *MapData) SwapGirde(oldId, newId int32, color int32) (bSwap bool, xCount int32) {
|
func (this *MapData) SwapGirde(oldId, newId int32, color int32) (bSwap bool, xCount int32) {
|
||||||
|
this.operElem = []int32{} // 初始化
|
||||||
if (oldId%Height-1 < Total && oldId+1 == newId) ||
|
if (oldId%Height+1 < Total && oldId+1 == newId) ||
|
||||||
(oldId%Height > 0 && oldId-1 == newId) ||
|
(oldId%Height > 0 && oldId-1 == newId) ||
|
||||||
(oldId+Width < Total && oldId+Width == newId) ||
|
(oldId+Width < Total && oldId+Width == newId) ||
|
||||||
(oldId-Width > 0 && oldId-Width == newId) {
|
(oldId-Width > 0 && oldId-Width == newId) {
|
||||||
@ -74,6 +75,8 @@ func (this *MapData) SwapGirde(oldId, newId int32, color int32) (bSwap bool, xCo
|
|||||||
*tmp = *this.Plat[newId]
|
*tmp = *this.Plat[newId]
|
||||||
this.Plat[newId] = this.Plat[oldId]
|
this.Plat[newId] = this.Plat[oldId]
|
||||||
this.Plat[oldId] = tmp
|
this.Plat[oldId] = tmp
|
||||||
|
this.operElem = append(this.operElem, newId)
|
||||||
|
this.operElem = append(this.operElem, oldId)
|
||||||
}
|
}
|
||||||
//this.CheckMap(color)
|
//this.CheckMap(color)
|
||||||
return
|
return
|
||||||
@ -124,7 +127,9 @@ func (this *MapData) Check5X(color int32) (bEliminate bool, score int32, count i
|
|||||||
k5 := this.Plat[k+4].Color
|
k5 := this.Plat[k+4].Color
|
||||||
|
|
||||||
if k1 == k2 && k3 == k4 && k5 == k1 && k2 == k3 {
|
if k1 == k2 && k3 == k4 && k5 == k1 && k2 == k3 {
|
||||||
|
if k1 == color {
|
||||||
|
count++
|
||||||
|
}
|
||||||
this.oid++
|
this.oid++
|
||||||
// 生成一个新的类型元素
|
// 生成一个新的类型元素
|
||||||
if conf, err := this.module.configure.GetGameBlock(k1, FiveType); err != nil {
|
if conf, err := this.module.configure.GetGameBlock(k1, FiveType); err != nil {
|
||||||
@ -150,7 +155,9 @@ func (this *MapData) Check5X(color int32) (bEliminate bool, score int32, count i
|
|||||||
k5 := this.Plat[k+4*Width].Color
|
k5 := this.Plat[k+4*Width].Color
|
||||||
|
|
||||||
if k1 == k2 && k3 == k4 && k5 == k1 && k2 == k3 {
|
if k1 == k2 && k3 == k4 && k5 == k1 && k2 == k3 {
|
||||||
|
if k1 == color {
|
||||||
|
count++
|
||||||
|
}
|
||||||
this.oid++
|
this.oid++
|
||||||
// 生成一个新的类型元素
|
// 生成一个新的类型元素
|
||||||
if conf, err := this.module.configure.GetGameBlock(k1, FiveType); err != nil {
|
if conf, err := this.module.configure.GetGameBlock(k1, FiveType); err != nil {
|
||||||
@ -196,6 +203,7 @@ func (this *MapData) Check5X(color int32) (bEliminate bool, score int32, count i
|
|||||||
}
|
}
|
||||||
score += this.Plat[id].Score
|
score += this.Plat[id].Score
|
||||||
this.Plat[id] = &pb.GirdeData{}
|
this.Plat[id] = &pb.GirdeData{}
|
||||||
|
this.operElem = append(this.operElem, int32(id))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -205,11 +213,15 @@ func (this *MapData) Check5X(color int32) (bEliminate bool, score int32, count i
|
|||||||
}
|
}
|
||||||
score += this.Plat[v].Score
|
score += this.Plat[v].Score
|
||||||
this.Plat[v] = &pb.GirdeData{}
|
this.Plat[v] = &pb.GirdeData{}
|
||||||
|
this.operElem = append(this.operElem, int32(v))
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *MapData) Check4X(color int32) (bEliminate bool, score int32, count int32) {
|
func (this *MapData) Check4X(color int32) (bEliminate bool, score int32, count int32) {
|
||||||
|
var (
|
||||||
|
newElem int // 生成的一个新的元素CID
|
||||||
|
)
|
||||||
var xiaochu []int // 即将消除的key
|
var xiaochu []int // 即将消除的key
|
||||||
for k, v := range this.Plat {
|
for k, v := range this.Plat {
|
||||||
if v.Color == 0 {
|
if v.Color == 0 {
|
||||||
@ -222,27 +234,39 @@ func (this *MapData) Check4X(color int32) (bEliminate bool, score int32, count i
|
|||||||
k2 := this.Plat[k+1].Color
|
k2 := this.Plat[k+1].Color
|
||||||
k3 := this.Plat[k+2].Color
|
k3 := this.Plat[k+2].Color
|
||||||
k4 := this.Plat[k+3].Color
|
k4 := this.Plat[k+3].Color
|
||||||
|
newElem = k + 2
|
||||||
if k1 == k2 && k3 == k4 && k2 == k3 {
|
if k1 == k2 && k3 == k4 && k2 == k3 {
|
||||||
|
for _, v1 := range this.operElem {
|
||||||
|
if v1 == k2 {
|
||||||
|
newElem = k + 1
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
this.oid++
|
this.oid++
|
||||||
// 生成一个新的类型元素
|
// 生成一个新的类型元素
|
||||||
if this.module != nil {
|
if this.module != nil {
|
||||||
if conf, err := this.module.configure.GetGameBlock(k1, FourUType); err != nil { // 上下类型
|
if conf, err := this.module.configure.GetGameBlock(k1, FourUType); err != nil { // 上下类型
|
||||||
this.Plat[k+1] = &pb.GirdeData{
|
this.Plat[newElem] = &pb.GirdeData{
|
||||||
Oid: this.oid,
|
Oid: this.oid,
|
||||||
Color: k1,
|
Color: k1,
|
||||||
Cid: conf.Key,
|
Cid: conf.Key,
|
||||||
Score: conf.Score,
|
Score: conf.Score,
|
||||||
Special: conf.Type,
|
Special: conf.Type,
|
||||||
}
|
}
|
||||||
|
if k1 == color {
|
||||||
|
count++
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
xiaochu = append(xiaochu, k+1)
|
xiaochu = append(xiaochu, newElem)
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
xiaochu = append(xiaochu, newElem)
|
||||||
}
|
}
|
||||||
xiaochu = append(xiaochu, k+1)
|
if newElem == k+1 {
|
||||||
xiaochu = append(xiaochu, []int{k, k + 2, k + 3}...)
|
xiaochu = append(xiaochu, []int{k, k + 2, k + 3}...)
|
||||||
|
} else {
|
||||||
|
xiaochu = append(xiaochu, []int{k, k + 1, k + 3}...)
|
||||||
|
}
|
||||||
bEliminate = true
|
bEliminate = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -253,11 +277,19 @@ func (this *MapData) Check4X(color int32) (bEliminate bool, score int32, count i
|
|||||||
k4 := this.Plat[k+3*Width].Color
|
k4 := this.Plat[k+3*Width].Color
|
||||||
|
|
||||||
if k1 == k2 && k3 == k4 && k2 == k3 {
|
if k1 == k2 && k3 == k4 && k2 == k3 {
|
||||||
|
newElem = k + 2*Width
|
||||||
|
if k1 == k2 && k3 == k4 && k2 == k3 {
|
||||||
|
for _, v1 := range this.operElem {
|
||||||
|
if v1 == k2 {
|
||||||
|
newElem = k + Width
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
this.oid++
|
this.oid++
|
||||||
if this.module != nil {
|
if this.module != nil {
|
||||||
// 生成一个新的类型元素
|
// 生成一个新的类型元素
|
||||||
if conf, err := this.module.configure.GetGameBlock(k1, FourLType); err != nil { // 左右类型
|
if conf, err := this.module.configure.GetGameBlock(k1, FourLType); err != nil { // 左右类型
|
||||||
this.Plat[k+Width] = &pb.GirdeData{
|
this.Plat[newElem] = &pb.GirdeData{
|
||||||
Oid: this.oid,
|
Oid: this.oid,
|
||||||
Color: k1,
|
Color: k1,
|
||||||
Cid: conf.Key,
|
Cid: conf.Key,
|
||||||
@ -270,14 +302,19 @@ func (this *MapData) Check4X(color int32) (bEliminate bool, score int32, count i
|
|||||||
} else {
|
} else {
|
||||||
xiaochu = append(xiaochu, k+Width)
|
xiaochu = append(xiaochu, k+Width)
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
xiaochu = append(xiaochu, k+Width)
|
xiaochu = append(xiaochu, k+Width)
|
||||||
|
}
|
||||||
|
if newElem == k+Width {
|
||||||
xiaochu = append(xiaochu, []int{k, k + 2*Width, k + 3*Width}...)
|
xiaochu = append(xiaochu, []int{k, k + 2*Width, k + 3*Width}...)
|
||||||
|
} else {
|
||||||
|
xiaochu = append(xiaochu, []int{k, k + Width, k + 3*Width}...)
|
||||||
|
}
|
||||||
bEliminate = true
|
bEliminate = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
var next []int
|
var next []int
|
||||||
for _, id := range xiaochu {
|
for _, id := range xiaochu {
|
||||||
@ -304,6 +341,7 @@ func (this *MapData) Check4X(color int32) (bEliminate bool, score int32, count i
|
|||||||
}
|
}
|
||||||
score += this.Plat[id].Score
|
score += this.Plat[id].Score
|
||||||
this.Plat[id] = &pb.GirdeData{}
|
this.Plat[id] = &pb.GirdeData{}
|
||||||
|
this.operElem = append(this.operElem, int32(id))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -313,6 +351,7 @@ func (this *MapData) Check4X(color int32) (bEliminate bool, score int32, count i
|
|||||||
}
|
}
|
||||||
score += this.Plat[v].Score
|
score += this.Plat[v].Score
|
||||||
this.Plat[v] = &pb.GirdeData{}
|
this.Plat[v] = &pb.GirdeData{}
|
||||||
|
this.operElem = append(this.operElem, int32(v))
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -372,6 +411,7 @@ func (this *MapData) Check3X(color int32) (bEliminate bool, score int32, count i
|
|||||||
}
|
}
|
||||||
score += this.Plat[id].Score
|
score += this.Plat[id].Score
|
||||||
this.Plat[id] = &pb.GirdeData{}
|
this.Plat[id] = &pb.GirdeData{}
|
||||||
|
this.operElem = append(this.operElem, int32(id))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -381,6 +421,7 @@ func (this *MapData) Check3X(color int32) (bEliminate bool, score int32, count i
|
|||||||
}
|
}
|
||||||
score += this.Plat[v].Score
|
score += this.Plat[v].Score
|
||||||
this.Plat[v] = &pb.GirdeData{}
|
this.Plat[v] = &pb.GirdeData{}
|
||||||
|
this.operElem = append(this.operElem, int32(v))
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -390,7 +431,7 @@ func (this *MapData) CheckMap(color int32) (score int32, szMap []*pb.MapData, co
|
|||||||
var curScore int32
|
var curScore int32
|
||||||
for {
|
for {
|
||||||
curScore = 0
|
curScore = 0
|
||||||
this.DropGirde() // 先掉落
|
|
||||||
if bRet, s, c := this.Check5X(color); bRet {
|
if bRet, s, c := this.Check5X(color); bRet {
|
||||||
fmt.Printf("=====检测消除5x===========\n")
|
fmt.Printf("=====检测消除5x===========\n")
|
||||||
curScore += s
|
curScore += s
|
||||||
@ -406,11 +447,15 @@ func (this *MapData) CheckMap(color int32) (score int32, szMap []*pb.MapData, co
|
|||||||
curScore += s
|
curScore += s
|
||||||
count += c
|
count += c
|
||||||
}
|
}
|
||||||
|
|
||||||
score += curScore // 总分
|
score += curScore // 总分
|
||||||
|
this.DropGirde()
|
||||||
szMap = append(szMap, &pb.MapData{
|
szMap = append(szMap, &pb.MapData{
|
||||||
Data: this.Plat,
|
Data: this.Plat,
|
||||||
CurSocre: curScore,
|
CurSocre: curScore,
|
||||||
})
|
})
|
||||||
|
// 检查掉落
|
||||||
|
this.operElem = []int32{} // 初始化操作元素
|
||||||
if curScore == 0 {
|
if curScore == 0 {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
@ -449,17 +494,17 @@ func (this *MapData) DropGirde() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// ai操作
|
// ai操作
|
||||||
func (this *MapData) AiSwapGirde() bool {
|
func (this *MapData) AiSwapGirde() (bSwap bool, szMap []*pb.MapData) {
|
||||||
var (
|
|
||||||
bSwap bool // 能否交换
|
|
||||||
)
|
|
||||||
for pos := 0; pos < Total; pos++ {
|
for pos := 0; pos < Total; pos++ {
|
||||||
y := pos % Height
|
y := pos % Height
|
||||||
if y < Height-1 {
|
if y < Height-1 {
|
||||||
if b, _ := this.SwapGirde(int32(pos), int32(pos+1), 2); b {
|
if b, _ := this.SwapGirde(int32(pos), int32(pos+1), 2); b {
|
||||||
if s, _, _ := this.CheckMap(2); s == 0 {
|
if s, m, _ := this.CheckMap(2); s == 0 {
|
||||||
this.SwapGirde(int32(pos+1), int32(pos), 2)
|
this.SwapGirde(int32(pos+1), int32(pos), 2)
|
||||||
|
this.operElem = []int32{}
|
||||||
} else {
|
} else {
|
||||||
|
szMap = append(szMap, m...)
|
||||||
bSwap = true
|
bSwap = true
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
@ -468,14 +513,16 @@ func (this *MapData) AiSwapGirde() bool {
|
|||||||
}
|
}
|
||||||
if pos/Width+1 < Width {
|
if pos/Width+1 < Width {
|
||||||
if b, _ := this.SwapGirde(int32(pos), int32(pos+Width), 2); b {
|
if b, _ := this.SwapGirde(int32(pos), int32(pos+Width), 2); b {
|
||||||
if s, _, _ := this.CheckMap(2); s == 0 {
|
if s, m, _ := this.CheckMap(2); s == 0 {
|
||||||
this.SwapGirde(int32(pos+Width), int32(pos), 2)
|
this.SwapGirde(int32(pos+Width), int32(pos), 2)
|
||||||
|
this.operElem = []int32{}
|
||||||
} else {
|
} else {
|
||||||
|
szMap = append(szMap, m...)
|
||||||
bSwap = true
|
bSwap = true
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return bSwap
|
return
|
||||||
}
|
}
|
||||||
|
@ -85,10 +85,15 @@ func Test_Main(t *testing.T) {
|
|||||||
m := new(entertainment.MapData)
|
m := new(entertainment.MapData)
|
||||||
m.InitMap(nil)
|
m.InitMap(nil)
|
||||||
m.SetMap()
|
m.SetMap()
|
||||||
|
|
||||||
|
var szMap []*pb.MapData
|
||||||
|
if bSwap, m := m.AiSwapGirde(); bSwap {
|
||||||
|
szMap = append(szMap, m...)
|
||||||
|
}
|
||||||
m.SwapGirde(1, 8, 1)
|
m.SwapGirde(1, 8, 1)
|
||||||
|
|
||||||
m.DropGirde()
|
m.DropGirde()
|
||||||
var szMap []*pb.MapData
|
|
||||||
if score, m, _ := m.CheckMap(1); score > 0 {
|
if score, m, _ := m.CheckMap(1); score > 0 {
|
||||||
|
|
||||||
szMap = append(szMap, m...)
|
szMap = append(szMap, m...)
|
||||||
|
@ -442,11 +442,12 @@ type EntertainOperatorRstPush struct {
|
|||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
Mpadata []*MapData `protobuf:"bytes,1,rep,name=mpadata,proto3" json:"mpadata"` // 地图数据
|
Mpadata []*MapData `protobuf:"bytes,1,rep,name=mpadata,proto3" json:"mpadata"` // 地图数据
|
||||||
Power string `protobuf:"bytes,2,opt,name=power,proto3" json:"power"` // 该谁操作了
|
Power string `protobuf:"bytes,2,opt,name=power,proto3" json:"power"` //下一个谁操作
|
||||||
Score int32 `protobuf:"varint,3,opt,name=score,proto3" json:"score"` // 获得积分
|
Curpower string `protobuf:"bytes,3,opt,name=curpower,proto3" json:"curpower"` //当前谁操作
|
||||||
Round int32 `protobuf:"varint,4,opt,name=round,proto3" json:"round"` // 轮数
|
Score int32 `protobuf:"varint,4,opt,name=score,proto3" json:"score"` // 获得积分
|
||||||
User1 *PlayerData `protobuf:"bytes,5,opt,name=user1,proto3" json:"user1"` // 玩家数据也需要同步
|
Round int32 `protobuf:"varint,5,opt,name=round,proto3" json:"round"` // 轮数
|
||||||
User2 *PlayerData `protobuf:"bytes,6,opt,name=user2,proto3" json:"user2"`
|
User1 *PlayerData `protobuf:"bytes,6,opt,name=user1,proto3" json:"user1"` // 玩家数据也需要同步
|
||||||
|
User2 *PlayerData `protobuf:"bytes,7,opt,name=user2,proto3" json:"user2"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *EntertainOperatorRstPush) Reset() {
|
func (x *EntertainOperatorRstPush) Reset() {
|
||||||
@ -495,6 +496,13 @@ func (x *EntertainOperatorRstPush) GetPower() string {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (x *EntertainOperatorRstPush) GetCurpower() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Curpower
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
func (x *EntertainOperatorRstPush) GetScore() int32 {
|
func (x *EntertainOperatorRstPush) GetScore() int32 {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.Score
|
return x.Score
|
||||||
@ -648,31 +656,33 @@ var file_entertain_entertain_msg_proto_rawDesc = []byte{
|
|||||||
0x15, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x74, 0x61, 0x69, 0x6e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74,
|
0x15, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x74, 0x61, 0x69, 0x6e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74,
|
||||||
0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73,
|
0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73,
|
||||||
0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73,
|
0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73,
|
||||||
0x22, 0xc6, 0x01, 0x0a, 0x18, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x74, 0x61, 0x69, 0x6e, 0x4f, 0x70,
|
0x22, 0xe2, 0x01, 0x0a, 0x18, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x74, 0x61, 0x69, 0x6e, 0x4f, 0x70,
|
||||||
0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x73, 0x74, 0x50, 0x75, 0x73, 0x68, 0x12, 0x22, 0x0a,
|
0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x73, 0x74, 0x50, 0x75, 0x73, 0x68, 0x12, 0x22, 0x0a,
|
||||||
0x07, 0x6d, 0x70, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x08,
|
0x07, 0x6d, 0x70, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x08,
|
||||||
0x2e, 0x4d, 0x61, 0x70, 0x44, 0x61, 0x74, 0x61, 0x52, 0x07, 0x6d, 0x70, 0x61, 0x64, 0x61, 0x74,
|
0x2e, 0x4d, 0x61, 0x70, 0x44, 0x61, 0x74, 0x61, 0x52, 0x07, 0x6d, 0x70, 0x61, 0x64, 0x61, 0x74,
|
||||||
0x61, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
|
0x61, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
|
||||||
0x52, 0x05, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65,
|
0x52, 0x05, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x75, 0x72, 0x70, 0x6f,
|
||||||
0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x14, 0x0a,
|
0x77, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x75, 0x72, 0x70, 0x6f,
|
||||||
0x05, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x72, 0x6f,
|
0x77, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x04, 0x20, 0x01,
|
||||||
0x75, 0x6e, 0x64, 0x12, 0x21, 0x0a, 0x05, 0x75, 0x73, 0x65, 0x72, 0x31, 0x18, 0x05, 0x20, 0x01,
|
0x28, 0x05, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x6f, 0x75,
|
||||||
0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x52,
|
0x6e, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x12,
|
||||||
0x05, 0x75, 0x73, 0x65, 0x72, 0x31, 0x12, 0x21, 0x0a, 0x05, 0x75, 0x73, 0x65, 0x72, 0x32, 0x18,
|
0x21, 0x0a, 0x05, 0x75, 0x73, 0x65, 0x72, 0x31, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b,
|
||||||
0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x44, 0x61,
|
0x2e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x52, 0x05, 0x75, 0x73, 0x65,
|
||||||
0x74, 0x61, 0x52, 0x05, 0x75, 0x73, 0x65, 0x72, 0x32, 0x22, 0xad, 0x01, 0x0a, 0x15, 0x45, 0x6e,
|
0x72, 0x31, 0x12, 0x21, 0x0a, 0x05, 0x75, 0x73, 0x65, 0x72, 0x32, 0x18, 0x07, 0x20, 0x01, 0x28,
|
||||||
0x74, 0x65, 0x72, 0x74, 0x61, 0x69, 0x6e, 0x47, 0x61, 0x6d, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x50,
|
0x0b, 0x32, 0x0b, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x52, 0x05,
|
||||||
0x75, 0x73, 0x68, 0x12, 0x21, 0x0a, 0x05, 0x75, 0x73, 0x65, 0x72, 0x31, 0x18, 0x01, 0x20, 0x01,
|
0x75, 0x73, 0x65, 0x72, 0x32, 0x22, 0xad, 0x01, 0x0a, 0x15, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x74,
|
||||||
0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x52,
|
0x61, 0x69, 0x6e, 0x47, 0x61, 0x6d, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x50, 0x75, 0x73, 0x68, 0x12,
|
||||||
0x05, 0x75, 0x73, 0x65, 0x72, 0x31, 0x12, 0x21, 0x0a, 0x05, 0x75, 0x73, 0x65, 0x72, 0x32, 0x18,
|
0x21, 0x0a, 0x05, 0x75, 0x73, 0x65, 0x72, 0x31, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b,
|
||||||
0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x44, 0x61,
|
0x2e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x52, 0x05, 0x75, 0x73, 0x65,
|
||||||
0x74, 0x61, 0x52, 0x05, 0x75, 0x73, 0x65, 0x72, 0x32, 0x12, 0x22, 0x0a, 0x07, 0x6d, 0x70, 0x61,
|
0x72, 0x31, 0x12, 0x21, 0x0a, 0x05, 0x75, 0x73, 0x65, 0x72, 0x32, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||||
0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x4d, 0x61, 0x70,
|
0x0b, 0x32, 0x0b, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x52, 0x05,
|
||||||
0x44, 0x61, 0x74, 0x61, 0x52, 0x07, 0x6d, 0x70, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x14, 0x0a,
|
0x75, 0x73, 0x65, 0x72, 0x32, 0x12, 0x22, 0x0a, 0x07, 0x6d, 0x70, 0x61, 0x64, 0x61, 0x74, 0x61,
|
||||||
0x05, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x6f,
|
0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x4d, 0x61, 0x70, 0x44, 0x61, 0x74, 0x61,
|
||||||
0x77, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x05, 0x20, 0x01,
|
0x52, 0x07, 0x6d, 0x70, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x6f, 0x77,
|
||||||
0x28, 0x05, 0x52, 0x05, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70,
|
0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x12,
|
||||||
0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
0x14, 0x0a, 0x05, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05,
|
||||||
|
0x72, 0x6f, 0x75, 0x6e, 0x64, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70,
|
||||||
|
0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
Loading…
Reference in New Issue
Block a user