diff --git a/api/operation.go b/api/operation.go index 878b6a5..f7498c7 100644 --- a/api/operation.go +++ b/api/operation.go @@ -47,12 +47,11 @@ var protoInstances = []proto.Message{ &ResDismissGameTable{}, &ReqGameStart{}, - &ResBigBlindChip{}, - &ResSmallBlindChip{}, - &ReqPlaceBetChip{}, &ReqBetWeakHand{}, &ReqBetDiscard{}, + + &ResNoticePlayerLine{}, } var ( diff --git a/api/poker.pb.go b/api/poker.pb.go index fe06a9f..cc2c209 100644 --- a/api/poker.pb.go +++ b/api/poker.pb.go @@ -644,8 +644,10 @@ type ReqCreateTable struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Players int32 `protobuf:"varint,1,opt,name=players,proto3" json:"players,omitempty"` - Robots int32 `protobuf:"varint,2,opt,name=robots,proto3" json:"robots,omitempty"` + Players int32 `protobuf:"varint,1,opt,name=players,proto3" json:"players,omitempty"` + Robots int32 `protobuf:"varint,2,opt,name=robots,proto3" json:"robots,omitempty"` + TexasType int32 `protobuf:"varint,3,opt,name=texasType,proto3" json:"texasType,omitempty"` // 游戏类型 + BigBlind int32 `protobuf:"varint,4,opt,name=bigBlind,proto3" json:"bigBlind,omitempty"` // 大盲注额 } func (x *ReqCreateTable) Reset() { @@ -694,6 +696,20 @@ func (x *ReqCreateTable) GetRobots() int32 { return 0 } +func (x *ReqCreateTable) GetTexasType() int32 { + if x != nil { + return x.TexasType + } + return 0 +} + +func (x *ReqCreateTable) GetBigBlind() int32 { + if x != nil { + return x.BigBlind + } + return 0 +} + type ResCreateTable struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1249,15 +1265,16 @@ type TablePlayer struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Robot bool `protobuf:"varint,1,opt,name=robot,proto3" json:"robot,omitempty"` // 是否机器人 - Id int64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"` - Username string `protobuf:"bytes,3,opt,name=username,proto3" json:"username,omitempty"` - Avatar string `protobuf:"bytes,4,opt,name=avatar,proto3" json:"avatar,omitempty"` - Chip int32 `protobuf:"varint,5,opt,name=chip,proto3" json:"chip,omitempty"` // 筹码 - Status int32 `protobuf:"varint,6,opt,name=status,proto3" json:"status,omitempty"` // 玩家状态: 1待准备开始,2已准备开始,已开始(3等待其他玩家动作,4待大盲注,5待小盲注,6待跟注,7已弃) - LastStatus int32 `protobuf:"varint,7,opt,name=lastStatus,proto3" json:"lastStatus,omitempty"` // TODO 删, 前端通过消息监听获取下注金额信息 - Master bool `protobuf:"varint,8,opt,name=master,proto3" json:"master,omitempty"` // 是否房主` - HandCard []*Card `protobuf:"bytes,15,rep,name=handCard,proto3" json:"handCard,omitempty"` // 手牌 + Robot bool `protobuf:"varint,1,opt,name=robot,proto3" json:"robot,omitempty"` // 是否机器人 + Id int64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"` + Username string `protobuf:"bytes,3,opt,name=username,proto3" json:"username,omitempty"` + Avatar string `protobuf:"bytes,4,opt,name=avatar,proto3" json:"avatar,omitempty"` + Chip int32 `protobuf:"varint,5,opt,name=chip,proto3" json:"chip,omitempty"` // 筹码 + Status int32 `protobuf:"varint,6,opt,name=status,proto3" json:"status,omitempty"` // 玩家状态: 1待准备开始,2已准备开始,已开始(3等待其他玩家动作,4待大盲注,5待小盲注,6待跟注,7已弃) + LastStatus int32 `protobuf:"varint,7,opt,name=lastStatus,proto3" json:"lastStatus,omitempty"` // TODO 删, 前端通过消息监听获取下注金额信息 + Master bool `protobuf:"varint,8,opt,name=master,proto3" json:"master,omitempty"` // 是否房主` + BetRole *BetRole `protobuf:"bytes,14,opt,name=betRole,proto3" json:"betRole,omitempty"` // 下注时规则限制 + HandCard []*Card `protobuf:"bytes,15,rep,name=handCard,proto3" json:"handCard,omitempty"` // 手牌 } func (x *TablePlayer) Reset() { @@ -1348,6 +1365,13 @@ func (x *TablePlayer) GetMaster() bool { return false } +func (x *TablePlayer) GetBetRole() *BetRole { + if x != nil { + return x.BetRole + } + return nil +} + func (x *TablePlayer) GetHandCard() []*Card { if x != nil { return x.HandCard @@ -1410,15 +1434,18 @@ func (x *Card) GetSuit() string { return "" } -// 开始游戏 -type ReqGameStart struct { +// player status in (4,6) 跟注时规则 +type BetRole struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + MinChip int32 `protobuf:"varint,1,opt,name=minChip,proto3" json:"minChip,omitempty"` // 最低下注额:小盲注加注(按惯例至少2倍与大盲注) + MaxChip int32 `protobuf:"varint,2,opt,name=maxChip,proto3" json:"maxChip,omitempty"` // 最高下注额: } -func (x *ReqGameStart) Reset() { - *x = ReqGameStart{} +func (x *BetRole) Reset() { + *x = BetRole{} if protoimpl.UnsafeEnabled { mi := &file_poker_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1426,13 +1453,13 @@ func (x *ReqGameStart) Reset() { } } -func (x *ReqGameStart) String() string { +func (x *BetRole) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ReqGameStart) ProtoMessage() {} +func (*BetRole) ProtoMessage() {} -func (x *ReqGameStart) ProtoReflect() protoreflect.Message { +func (x *BetRole) ProtoReflect() protoreflect.Message { mi := &file_poker_proto_msgTypes[25] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1444,85 +1471,49 @@ func (x *ReqGameStart) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ReqGameStart.ProtoReflect.Descriptor instead. -func (*ReqGameStart) Descriptor() ([]byte, []int) { +// Deprecated: Use BetRole.ProtoReflect.Descriptor instead. +func (*BetRole) Descriptor() ([]byte, []int) { return file_poker_proto_rawDescGZIP(), []int{25} } -// 扣除大盲注 -type ResBigBlindChip struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Chip int32 `protobuf:"varint,1,opt,name=chip,proto3" json:"chip,omitempty"` -} - -func (x *ResBigBlindChip) Reset() { - *x = ResBigBlindChip{} - if protoimpl.UnsafeEnabled { - mi := &file_poker_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ResBigBlindChip) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ResBigBlindChip) ProtoMessage() {} - -func (x *ResBigBlindChip) ProtoReflect() protoreflect.Message { - mi := &file_poker_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *BetRole) GetMinChip() int32 { + if x != nil { + return x.MinChip } - return mi.MessageOf(x) -} - -// Deprecated: Use ResBigBlindChip.ProtoReflect.Descriptor instead. -func (*ResBigBlindChip) Descriptor() ([]byte, []int) { - return file_poker_proto_rawDescGZIP(), []int{26} + return 0 } -func (x *ResBigBlindChip) GetChip() int32 { +func (x *BetRole) GetMaxChip() int32 { if x != nil { - return x.Chip + return x.MaxChip } return 0 } -// 扣除小盲注消息, 然后发牌 -type ResSmallBlindChip struct { +// 开始游戏 +type ReqGameStart struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - - Chip int32 `protobuf:"varint,1,opt,name=chip,proto3" json:"chip,omitempty"` } -func (x *ResSmallBlindChip) Reset() { - *x = ResSmallBlindChip{} +func (x *ReqGameStart) Reset() { + *x = ReqGameStart{} if protoimpl.UnsafeEnabled { - mi := &file_poker_proto_msgTypes[27] + mi := &file_poker_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *ResSmallBlindChip) String() string { +func (x *ReqGameStart) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ResSmallBlindChip) ProtoMessage() {} +func (*ReqGameStart) ProtoMessage() {} -func (x *ResSmallBlindChip) ProtoReflect() protoreflect.Message { - mi := &file_poker_proto_msgTypes[27] +func (x *ReqGameStart) ProtoReflect() protoreflect.Message { + mi := &file_poker_proto_msgTypes[26] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1533,16 +1524,9 @@ func (x *ResSmallBlindChip) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ResSmallBlindChip.ProtoReflect.Descriptor instead. -func (*ResSmallBlindChip) Descriptor() ([]byte, []int) { - return file_poker_proto_rawDescGZIP(), []int{27} -} - -func (x *ResSmallBlindChip) GetChip() int32 { - if x != nil { - return x.Chip - } - return 0 +// Deprecated: Use ReqGameStart.ProtoReflect.Descriptor instead. +func (*ReqGameStart) Descriptor() ([]byte, []int) { + return file_poker_proto_rawDescGZIP(), []int{26} } // 解散房间 @@ -1555,7 +1539,7 @@ type ReqDismissGameTable struct { func (x *ReqDismissGameTable) Reset() { *x = ReqDismissGameTable{} if protoimpl.UnsafeEnabled { - mi := &file_poker_proto_msgTypes[28] + mi := &file_poker_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1568,7 +1552,7 @@ func (x *ReqDismissGameTable) String() string { func (*ReqDismissGameTable) ProtoMessage() {} func (x *ReqDismissGameTable) ProtoReflect() protoreflect.Message { - mi := &file_poker_proto_msgTypes[28] + mi := &file_poker_proto_msgTypes[27] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1581,7 +1565,7 @@ func (x *ReqDismissGameTable) ProtoReflect() protoreflect.Message { // Deprecated: Use ReqDismissGameTable.ProtoReflect.Descriptor instead. func (*ReqDismissGameTable) Descriptor() ([]byte, []int) { - return file_poker_proto_rawDescGZIP(), []int{28} + return file_poker_proto_rawDescGZIP(), []int{27} } type ResDismissGameTable struct { @@ -1593,7 +1577,7 @@ type ResDismissGameTable struct { func (x *ResDismissGameTable) Reset() { *x = ResDismissGameTable{} if protoimpl.UnsafeEnabled { - mi := &file_poker_proto_msgTypes[29] + mi := &file_poker_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1606,7 +1590,7 @@ func (x *ResDismissGameTable) String() string { func (*ResDismissGameTable) ProtoMessage() {} func (x *ResDismissGameTable) ProtoReflect() protoreflect.Message { - mi := &file_poker_proto_msgTypes[29] + mi := &file_poker_proto_msgTypes[28] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1619,7 +1603,7 @@ func (x *ResDismissGameTable) ProtoReflect() protoreflect.Message { // Deprecated: Use ResDismissGameTable.ProtoReflect.Descriptor instead. func (*ResDismissGameTable) Descriptor() ([]byte, []int) { - return file_poker_proto_rawDescGZIP(), []int{29} + return file_poker_proto_rawDescGZIP(), []int{28} } // 下注 @@ -1628,13 +1612,14 @@ type ReqPlaceBetChip struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Chip int32 `protobuf:"varint,1,opt,name=chip,proto3" json:"chip,omitempty"` + BetChip int32 `protobuf:"varint,1,opt,name=betChip,proto3" json:"betChip,omitempty"` // 跟注/加注金额 + AllIn bool `protobuf:"varint,2,opt,name=allIn,proto3" json:"allIn,omitempty"` // 是否 allIn } func (x *ReqPlaceBetChip) Reset() { *x = ReqPlaceBetChip{} if protoimpl.UnsafeEnabled { - mi := &file_poker_proto_msgTypes[30] + mi := &file_poker_proto_msgTypes[29] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1647,7 +1632,7 @@ func (x *ReqPlaceBetChip) String() string { func (*ReqPlaceBetChip) ProtoMessage() {} func (x *ReqPlaceBetChip) ProtoReflect() protoreflect.Message { - mi := &file_poker_proto_msgTypes[30] + mi := &file_poker_proto_msgTypes[29] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1660,16 +1645,23 @@ func (x *ReqPlaceBetChip) ProtoReflect() protoreflect.Message { // Deprecated: Use ReqPlaceBetChip.ProtoReflect.Descriptor instead. func (*ReqPlaceBetChip) Descriptor() ([]byte, []int) { - return file_poker_proto_rawDescGZIP(), []int{30} + return file_poker_proto_rawDescGZIP(), []int{29} } -func (x *ReqPlaceBetChip) GetChip() int32 { +func (x *ReqPlaceBetChip) GetBetChip() int32 { if x != nil { - return x.Chip + return x.BetChip } return 0 } +func (x *ReqPlaceBetChip) GetAllIn() bool { + if x != nil { + return x.AllIn + } + return false +} + // 让牌 type ReqBetWeakHand struct { state protoimpl.MessageState @@ -1680,7 +1672,7 @@ type ReqBetWeakHand struct { func (x *ReqBetWeakHand) Reset() { *x = ReqBetWeakHand{} if protoimpl.UnsafeEnabled { - mi := &file_poker_proto_msgTypes[31] + mi := &file_poker_proto_msgTypes[30] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1693,7 +1685,7 @@ func (x *ReqBetWeakHand) String() string { func (*ReqBetWeakHand) ProtoMessage() {} func (x *ReqBetWeakHand) ProtoReflect() protoreflect.Message { - mi := &file_poker_proto_msgTypes[31] + mi := &file_poker_proto_msgTypes[30] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1706,7 +1698,7 @@ func (x *ReqBetWeakHand) ProtoReflect() protoreflect.Message { // Deprecated: Use ReqBetWeakHand.ProtoReflect.Descriptor instead. func (*ReqBetWeakHand) Descriptor() ([]byte, []int) { - return file_poker_proto_rawDescGZIP(), []int{31} + return file_poker_proto_rawDescGZIP(), []int{30} } // 弃牌 @@ -1719,7 +1711,7 @@ type ReqBetDiscard struct { func (x *ReqBetDiscard) Reset() { *x = ReqBetDiscard{} if protoimpl.UnsafeEnabled { - mi := &file_poker_proto_msgTypes[32] + mi := &file_poker_proto_msgTypes[31] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1732,7 +1724,7 @@ func (x *ReqBetDiscard) String() string { func (*ReqBetDiscard) ProtoMessage() {} func (x *ReqBetDiscard) ProtoReflect() protoreflect.Message { - mi := &file_poker_proto_msgTypes[32] + mi := &file_poker_proto_msgTypes[31] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1745,9 +1737,81 @@ func (x *ReqBetDiscard) ProtoReflect() protoreflect.Message { // Deprecated: Use ReqBetDiscard.ProtoReflect.Descriptor instead. func (*ReqBetDiscard) Descriptor() ([]byte, []int) { + return file_poker_proto_rawDescGZIP(), []int{31} +} + +// 通知玩家某个其他玩家动作 +type ResNoticePlayerLine struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PlayerId int64 `protobuf:"varint,1,opt,name=playerId,proto3" json:"playerId,omitempty"` + Line1 string `protobuf:"bytes,11,opt,name=line1,proto3" json:"line1,omitempty"` + Line2 string `protobuf:"bytes,12,opt,name=line2,proto3" json:"line2,omitempty"` + Line3 string `protobuf:"bytes,13,opt,name=line3,proto3" json:"line3,omitempty"` +} + +func (x *ResNoticePlayerLine) Reset() { + *x = ResNoticePlayerLine{} + if protoimpl.UnsafeEnabled { + mi := &file_poker_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ResNoticePlayerLine) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResNoticePlayerLine) ProtoMessage() {} + +func (x *ResNoticePlayerLine) ProtoReflect() protoreflect.Message { + mi := &file_poker_proto_msgTypes[32] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResNoticePlayerLine.ProtoReflect.Descriptor instead. +func (*ResNoticePlayerLine) Descriptor() ([]byte, []int) { return file_poker_proto_rawDescGZIP(), []int{32} } +func (x *ResNoticePlayerLine) GetPlayerId() int64 { + if x != nil { + return x.PlayerId + } + return 0 +} + +func (x *ResNoticePlayerLine) GetLine1() string { + if x != nil { + return x.Line1 + } + return "" +} + +func (x *ResNoticePlayerLine) GetLine2() string { + if x != nil { + return x.Line2 + } + return "" +} + +func (x *ResNoticePlayerLine) GetLine3() string { + if x != nil { + return x.Line3 + } + return "" +} + var File_poker_proto protoreflect.FileDescriptor var file_poker_proto_rawDesc = []byte{ @@ -1795,85 +1859,99 @@ var file_poker_proto_rawDesc = []byte{ 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x22, 0x42, 0x0a, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x22, 0x7c, 0x0a, 0x0e, 0x52, 0x65, 0x71, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x6f, 0x62, 0x6f, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x72, 0x6f, 0x62, 0x6f, 0x74, - 0x73, 0x22, 0x2a, 0x0a, 0x0e, 0x52, 0x65, 0x73, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, - 0x62, 0x6c, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x6f, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x6f, 0x22, 0x28, 0x0a, - 0x0c, 0x52, 0x65, 0x71, 0x4a, 0x6f, 0x69, 0x6e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x18, 0x0a, + 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x65, 0x78, 0x61, 0x73, 0x54, 0x79, 0x70, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x74, 0x65, 0x78, 0x61, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x1a, 0x0a, 0x08, 0x62, 0x69, 0x67, 0x42, 0x6c, 0x69, 0x6e, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x08, 0x62, 0x69, 0x67, 0x42, 0x6c, 0x69, 0x6e, 0x64, 0x22, 0x2a, 0x0a, 0x0e, 0x52, + 0x65, 0x73, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, - 0x74, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x6f, 0x22, 0x0f, 0x0a, 0x0d, 0x52, 0x65, 0x71, 0x4c, 0x65, - 0x61, 0x76, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x22, 0x0f, 0x0a, 0x0d, 0x52, 0x65, 0x71, 0x52, - 0x65, 0x61, 0x64, 0x79, 0x53, 0x74, 0x61, 0x72, 0x74, 0x22, 0x10, 0x0a, 0x0e, 0x52, 0x65, 0x71, - 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x52, 0x65, 0x61, 0x64, 0x79, 0x22, 0x2d, 0x0a, 0x0f, 0x52, - 0x65, 0x71, 0x4b, 0x69, 0x63, 0x6b, 0x4f, 0x75, 0x74, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x1a, - 0x0a, 0x08, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x08, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x49, 0x64, 0x22, 0x11, 0x0a, 0x0f, 0x52, 0x65, - 0x73, 0x4b, 0x69, 0x63, 0x6b, 0x4f, 0x75, 0x74, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x22, 0x3b, 0x0a, - 0x0d, 0x52, 0x65, 0x71, 0x47, 0x61, 0x6d, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, - 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x68, 0x69, 0x70, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x63, 0x68, 0x69, 0x70, 0x22, 0x0f, 0x0a, 0x0d, 0x52, 0x65, - 0x73, 0x47, 0x61, 0x6d, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x13, 0x0a, 0x11, 0x52, - 0x65, 0x71, 0x47, 0x61, 0x6d, 0x65, 0x46, 0x75, 0x6c, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x22, 0xd2, 0x02, 0x0a, 0x11, 0x52, 0x65, 0x73, 0x47, 0x61, 0x6d, 0x65, 0x46, 0x75, 0x6c, 0x6c, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x6e, 0x47, 0x61, 0x6d, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x6e, 0x47, 0x61, 0x6d, 0x65, 0x12, 0x18, - 0x0a, 0x07, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x07, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x6f, 0x12, 0x1c, 0x0a, 0x09, 0x67, 0x61, 0x6d, 0x65, - 0x53, 0x74, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x67, 0x61, 0x6d, - 0x65, 0x53, 0x74, 0x61, 0x67, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x68, 0x69, 0x70, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x63, 0x68, 0x69, 0x70, 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x6f, - 0x75, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, - 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6c, - 0x61, 0x79, 0x65, 0x72, 0x49, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x70, 0x6c, - 0x61, 0x79, 0x65, 0x72, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x62, 0x69, 0x67, 0x42, 0x6c, 0x69, - 0x6e, 0x64, 0x50, 0x6f, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x62, 0x69, 0x67, - 0x42, 0x6c, 0x69, 0x6e, 0x64, 0x50, 0x6f, 0x73, 0x12, 0x24, 0x0a, 0x0d, 0x73, 0x6d, 0x61, 0x6c, - 0x6c, 0x42, 0x6c, 0x69, 0x6e, 0x64, 0x50, 0x6f, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x0d, 0x73, 0x6d, 0x61, 0x6c, 0x6c, 0x42, 0x6c, 0x69, 0x6e, 0x64, 0x50, 0x6f, 0x73, 0x12, 0x29, - 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x43, 0x61, 0x72, 0x64, 0x18, 0x0e, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x61, 0x72, 0x64, 0x52, 0x0a, 0x70, - 0x75, 0x62, 0x6c, 0x69, 0x63, 0x43, 0x61, 0x72, 0x64, 0x12, 0x2a, 0x0a, 0x07, 0x70, 0x6c, 0x61, - 0x79, 0x65, 0x72, 0x73, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x52, 0x07, 0x70, 0x6c, - 0x61, 0x79, 0x65, 0x72, 0x73, 0x22, 0xf2, 0x01, 0x0a, 0x0b, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x50, - 0x6c, 0x61, 0x79, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x6f, 0x62, 0x6f, 0x74, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x72, 0x6f, 0x62, 0x6f, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x75, - 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, - 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, - 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x12, - 0x12, 0x0a, 0x04, 0x63, 0x68, 0x69, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x63, - 0x68, 0x69, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x6c, - 0x61, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x0a, 0x6c, 0x61, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x6d, - 0x61, 0x73, 0x74, 0x65, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x6d, 0x61, 0x73, - 0x74, 0x65, 0x72, 0x12, 0x25, 0x0a, 0x08, 0x68, 0x61, 0x6e, 0x64, 0x43, 0x61, 0x72, 0x64, 0x18, - 0x0f, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x61, 0x72, 0x64, - 0x52, 0x08, 0x68, 0x61, 0x6e, 0x64, 0x43, 0x61, 0x72, 0x64, 0x22, 0x2c, 0x0a, 0x04, 0x43, 0x61, - 0x72, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x03, 0x64, 0x6f, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x75, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x73, 0x75, 0x69, 0x74, 0x22, 0x0e, 0x0a, 0x0c, 0x52, 0x65, 0x71, 0x47, - 0x61, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x72, 0x74, 0x22, 0x25, 0x0a, 0x0f, 0x52, 0x65, 0x73, 0x42, - 0x69, 0x67, 0x42, 0x6c, 0x69, 0x6e, 0x64, 0x43, 0x68, 0x69, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x63, - 0x68, 0x69, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x63, 0x68, 0x69, 0x70, 0x22, - 0x27, 0x0a, 0x11, 0x52, 0x65, 0x73, 0x53, 0x6d, 0x61, 0x6c, 0x6c, 0x42, 0x6c, 0x69, 0x6e, 0x64, - 0x43, 0x68, 0x69, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x68, 0x69, 0x70, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x04, 0x63, 0x68, 0x69, 0x70, 0x22, 0x15, 0x0a, 0x13, 0x52, 0x65, 0x71, 0x44, - 0x69, 0x73, 0x6d, 0x69, 0x73, 0x73, 0x47, 0x61, 0x6d, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x22, - 0x15, 0x0a, 0x13, 0x52, 0x65, 0x73, 0x44, 0x69, 0x73, 0x6d, 0x69, 0x73, 0x73, 0x47, 0x61, 0x6d, - 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x22, 0x25, 0x0a, 0x0f, 0x52, 0x65, 0x71, 0x50, 0x6c, 0x61, - 0x63, 0x65, 0x42, 0x65, 0x74, 0x43, 0x68, 0x69, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x68, 0x69, - 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x63, 0x68, 0x69, 0x70, 0x22, 0x10, 0x0a, - 0x0e, 0x52, 0x65, 0x71, 0x42, 0x65, 0x74, 0x57, 0x65, 0x61, 0x6b, 0x48, 0x61, 0x6e, 0x64, 0x22, - 0x0f, 0x0a, 0x0d, 0x52, 0x65, 0x71, 0x42, 0x65, 0x74, 0x44, 0x69, 0x73, 0x63, 0x61, 0x72, 0x64, - 0x42, 0x0b, 0x5a, 0x09, 0x2e, 0x2f, 0x61, 0x70, 0x69, 0x3b, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x6f, 0x22, 0x28, 0x0a, 0x0c, 0x52, 0x65, 0x71, 0x4a, 0x6f, + 0x69, 0x6e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x61, 0x62, 0x6c, 0x65, + 0x4e, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x4e, + 0x6f, 0x22, 0x0f, 0x0a, 0x0d, 0x52, 0x65, 0x71, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x54, 0x61, 0x62, + 0x6c, 0x65, 0x22, 0x0f, 0x0a, 0x0d, 0x52, 0x65, 0x71, 0x52, 0x65, 0x61, 0x64, 0x79, 0x53, 0x74, + 0x61, 0x72, 0x74, 0x22, 0x10, 0x0a, 0x0e, 0x52, 0x65, 0x71, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, + 0x52, 0x65, 0x61, 0x64, 0x79, 0x22, 0x2d, 0x0a, 0x0f, 0x52, 0x65, 0x71, 0x4b, 0x69, 0x63, 0x6b, + 0x4f, 0x75, 0x74, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6c, 0x61, 0x79, + 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x79, + 0x65, 0x72, 0x49, 0x64, 0x22, 0x11, 0x0a, 0x0f, 0x52, 0x65, 0x73, 0x4b, 0x69, 0x63, 0x6b, 0x4f, + 0x75, 0x74, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x22, 0x3b, 0x0a, 0x0d, 0x52, 0x65, 0x71, 0x47, 0x61, + 0x6d, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x12, 0x0a, 0x04, 0x63, 0x68, 0x69, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, + 0x63, 0x68, 0x69, 0x70, 0x22, 0x0f, 0x0a, 0x0d, 0x52, 0x65, 0x73, 0x47, 0x61, 0x6d, 0x65, 0x41, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x13, 0x0a, 0x11, 0x52, 0x65, 0x71, 0x47, 0x61, 0x6d, 0x65, + 0x46, 0x75, 0x6c, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0xd2, 0x02, 0x0a, 0x11, 0x52, + 0x65, 0x73, 0x47, 0x61, 0x6d, 0x65, 0x46, 0x75, 0x6c, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x12, 0x16, 0x0a, 0x06, 0x69, 0x6e, 0x47, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x06, 0x69, 0x6e, 0x47, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x61, 0x62, 0x6c, + 0x65, 0x4e, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x74, 0x61, 0x62, 0x6c, 0x65, + 0x4e, 0x6f, 0x12, 0x1c, 0x0a, 0x09, 0x67, 0x61, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x67, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x67, 0x61, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x67, 0x65, + 0x12, 0x12, 0x0a, 0x04, 0x63, 0x68, 0x69, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, + 0x63, 0x68, 0x69, 0x70, 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x54, + 0x69, 0x6d, 0x65, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x49, 0x64, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x49, 0x64, + 0x12, 0x20, 0x0a, 0x0b, 0x62, 0x69, 0x67, 0x42, 0x6c, 0x69, 0x6e, 0x64, 0x50, 0x6f, 0x73, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x62, 0x69, 0x67, 0x42, 0x6c, 0x69, 0x6e, 0x64, 0x50, + 0x6f, 0x73, 0x12, 0x24, 0x0a, 0x0d, 0x73, 0x6d, 0x61, 0x6c, 0x6c, 0x42, 0x6c, 0x69, 0x6e, 0x64, + 0x50, 0x6f, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x73, 0x6d, 0x61, 0x6c, 0x6c, + 0x42, 0x6c, 0x69, 0x6e, 0x64, 0x50, 0x6f, 0x73, 0x12, 0x29, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, + 0x69, 0x63, 0x43, 0x61, 0x72, 0x64, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x43, 0x61, 0x72, 0x64, 0x52, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x43, + 0x61, 0x72, 0x64, 0x12, 0x2a, 0x0a, 0x07, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x18, 0x0f, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, + 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x52, 0x07, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x22, + 0x9a, 0x02, 0x0a, 0x0b, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x12, + 0x14, 0x0a, 0x05, 0x72, 0x6f, 0x62, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, + 0x72, 0x6f, 0x62, 0x6f, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, + 0x65, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x68, 0x69, + 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x63, 0x68, 0x69, 0x70, 0x12, 0x16, 0x0a, + 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x6c, 0x61, 0x73, 0x74, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x6c, 0x61, 0x73, 0x74, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x18, + 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x12, 0x26, 0x0a, + 0x07, 0x62, 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x42, 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x07, 0x62, 0x65, + 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x25, 0x0a, 0x08, 0x68, 0x61, 0x6e, 0x64, 0x43, 0x61, 0x72, + 0x64, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x61, + 0x72, 0x64, 0x52, 0x08, 0x68, 0x61, 0x6e, 0x64, 0x43, 0x61, 0x72, 0x64, 0x22, 0x2c, 0x0a, 0x04, + 0x43, 0x61, 0x72, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x03, 0x64, 0x6f, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x75, 0x69, 0x74, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x75, 0x69, 0x74, 0x22, 0x3d, 0x0a, 0x07, 0x42, 0x65, + 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x69, 0x6e, 0x43, 0x68, 0x69, 0x70, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x6d, 0x69, 0x6e, 0x43, 0x68, 0x69, 0x70, 0x12, + 0x18, 0x0a, 0x07, 0x6d, 0x61, 0x78, 0x43, 0x68, 0x69, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x07, 0x6d, 0x61, 0x78, 0x43, 0x68, 0x69, 0x70, 0x22, 0x0e, 0x0a, 0x0c, 0x52, 0x65, 0x71, + 0x47, 0x61, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x72, 0x74, 0x22, 0x15, 0x0a, 0x13, 0x52, 0x65, 0x71, + 0x44, 0x69, 0x73, 0x6d, 0x69, 0x73, 0x73, 0x47, 0x61, 0x6d, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, + 0x22, 0x15, 0x0a, 0x13, 0x52, 0x65, 0x73, 0x44, 0x69, 0x73, 0x6d, 0x69, 0x73, 0x73, 0x47, 0x61, + 0x6d, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x22, 0x41, 0x0a, 0x0f, 0x52, 0x65, 0x71, 0x50, 0x6c, + 0x61, 0x63, 0x65, 0x42, 0x65, 0x74, 0x43, 0x68, 0x69, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x62, 0x65, + 0x74, 0x43, 0x68, 0x69, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x62, 0x65, 0x74, + 0x43, 0x68, 0x69, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x6c, 0x6c, 0x49, 0x6e, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x05, 0x61, 0x6c, 0x6c, 0x49, 0x6e, 0x22, 0x10, 0x0a, 0x0e, 0x52, 0x65, + 0x71, 0x42, 0x65, 0x74, 0x57, 0x65, 0x61, 0x6b, 0x48, 0x61, 0x6e, 0x64, 0x22, 0x0f, 0x0a, 0x0d, + 0x52, 0x65, 0x71, 0x42, 0x65, 0x74, 0x44, 0x69, 0x73, 0x63, 0x61, 0x72, 0x64, 0x22, 0x73, 0x0a, + 0x13, 0x52, 0x65, 0x73, 0x4e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, + 0x4c, 0x69, 0x6e, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x49, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x49, 0x64, + 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6e, 0x65, 0x31, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x6c, 0x69, 0x6e, 0x65, 0x31, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6e, 0x65, 0x32, 0x18, + 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x69, 0x6e, 0x65, 0x32, 0x12, 0x14, 0x0a, 0x05, + 0x6c, 0x69, 0x6e, 0x65, 0x33, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x69, 0x6e, + 0x65, 0x33, 0x42, 0x0b, 0x5a, 0x09, 0x2e, 0x2f, 0x61, 0x70, 0x69, 0x3b, 0x61, 0x70, 0x69, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1915,26 +1993,27 @@ var file_poker_proto_goTypes = []interface{}{ (*ResGameFullStatus)(nil), // 22: api.ResGameFullStatus (*TablePlayer)(nil), // 23: api.TablePlayer (*Card)(nil), // 24: api.Card - (*ReqGameStart)(nil), // 25: api.ReqGameStart - (*ResBigBlindChip)(nil), // 26: api.ResBigBlindChip - (*ResSmallBlindChip)(nil), // 27: api.ResSmallBlindChip - (*ReqDismissGameTable)(nil), // 28: api.ReqDismissGameTable - (*ResDismissGameTable)(nil), // 29: api.ResDismissGameTable - (*ReqPlaceBetChip)(nil), // 30: api.ReqPlaceBetChip - (*ReqBetWeakHand)(nil), // 31: api.ReqBetWeakHand - (*ReqBetDiscard)(nil), // 32: api.ReqBetDiscard + (*BetRole)(nil), // 25: api.BetRole + (*ReqGameStart)(nil), // 26: api.ReqGameStart + (*ReqDismissGameTable)(nil), // 27: api.ReqDismissGameTable + (*ResDismissGameTable)(nil), // 28: api.ResDismissGameTable + (*ReqPlaceBetChip)(nil), // 29: api.ReqPlaceBetChip + (*ReqBetWeakHand)(nil), // 30: api.ReqBetWeakHand + (*ReqBetDiscard)(nil), // 31: api.ReqBetDiscard + (*ResNoticePlayerLine)(nil), // 32: api.ResNoticePlayerLine } var file_poker_proto_depIdxs = []int32{ 9, // 0: api.ResLobbyView.tables:type_name -> api.LobbyTable 10, // 1: api.LobbyTable.players:type_name -> api.LobbyPlayer 24, // 2: api.ResGameFullStatus.publicCard:type_name -> api.Card 23, // 3: api.ResGameFullStatus.players:type_name -> api.TablePlayer - 24, // 4: api.TablePlayer.handCard:type_name -> api.Card - 5, // [5:5] is the sub-list for method output_type - 5, // [5:5] is the sub-list for method input_type - 5, // [5:5] is the sub-list for extension type_name - 5, // [5:5] is the sub-list for extension extendee - 0, // [0:5] is the sub-list for field type_name + 25, // 4: api.TablePlayer.betRole:type_name -> api.BetRole + 24, // 5: api.TablePlayer.handCard:type_name -> api.Card + 6, // [6:6] is the sub-list for method output_type + 6, // [6:6] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name } func init() { file_poker_proto_init() } @@ -2244,7 +2323,7 @@ func file_poker_proto_init() { } } file_poker_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ReqGameStart); i { + switch v := v.(*BetRole); i { case 0: return &v.state case 1: @@ -2256,7 +2335,7 @@ func file_poker_proto_init() { } } file_poker_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResBigBlindChip); i { + switch v := v.(*ReqGameStart); i { case 0: return &v.state case 1: @@ -2268,7 +2347,7 @@ func file_poker_proto_init() { } } file_poker_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResSmallBlindChip); i { + switch v := v.(*ReqDismissGameTable); i { case 0: return &v.state case 1: @@ -2280,7 +2359,7 @@ func file_poker_proto_init() { } } file_poker_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ReqDismissGameTable); i { + switch v := v.(*ResDismissGameTable); i { case 0: return &v.state case 1: @@ -2292,7 +2371,7 @@ func file_poker_proto_init() { } } file_poker_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResDismissGameTable); i { + switch v := v.(*ReqPlaceBetChip); i { case 0: return &v.state case 1: @@ -2304,7 +2383,7 @@ func file_poker_proto_init() { } } file_poker_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ReqPlaceBetChip); i { + switch v := v.(*ReqBetWeakHand); i { case 0: return &v.state case 1: @@ -2316,7 +2395,7 @@ func file_poker_proto_init() { } } file_poker_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ReqBetWeakHand); i { + switch v := v.(*ReqBetDiscard); i { case 0: return &v.state case 1: @@ -2328,7 +2407,7 @@ func file_poker_proto_init() { } } file_poker_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ReqBetDiscard); i { + switch v := v.(*ResNoticePlayerLine); i { case 0: return &v.state case 1: diff --git a/api/poker.proto b/api/poker.proto index 758d307..e061e87 100644 --- a/api/poker.proto +++ b/api/poker.proto @@ -75,6 +75,8 @@ message LobbyPlayer { message ReqCreateTable { int32 players = 1; int32 robots = 2; + int32 texasType = 3; // 游戏类型 + int32 bigBlind = 4; // 大盲注额 } message ResCreateTable { @@ -169,16 +171,6 @@ message ReqGameStart { } -// 扣除大盲注 -message ResBigBlindChip { - int32 chip = 1; -} - -// 扣除小盲注消息, 然后发牌 -message ResSmallBlindChip { - int32 chip = 1; -} - // 解散房间 message ReqDismissGameTable { } @@ -189,6 +181,7 @@ message ResDismissGameTable { message ReqPlaceBetChip { int32 betChip = 1; // 跟注/加注金额 bool allIn = 2; // 是否 allIn + } // 让牌 @@ -200,3 +193,12 @@ message ReqBetWeakHand { message ReqBetDiscard { } + +// 通知玩家某个其他玩家动作 +message ResNoticePlayerLine { + int64 playerId = 1; + + string line1 = 11; + string line2 = 12; + string line3 = 13; +} diff --git a/api/proto.js b/api/proto.js index dddef70..6a21602 100644 --- a/api/proto.js +++ b/api/proto.js @@ -2641,6 +2641,8 @@ export const api = $root.api = (() => { * @interface IReqCreateTable * @property {number|null} [players] ReqCreateTable players * @property {number|null} [robots] ReqCreateTable robots + * @property {number|null} [texasType] ReqCreateTable texasType + * @property {number|null} [bigBlind] ReqCreateTable bigBlind */ /** @@ -2674,6 +2676,22 @@ export const api = $root.api = (() => { */ ReqCreateTable.prototype.robots = 0; + /** + * ReqCreateTable texasType. + * @member {number} texasType + * @memberof api.ReqCreateTable + * @instance + */ + ReqCreateTable.prototype.texasType = 0; + + /** + * ReqCreateTable bigBlind. + * @member {number} bigBlind + * @memberof api.ReqCreateTable + * @instance + */ + ReqCreateTable.prototype.bigBlind = 0; + /** * Creates a new ReqCreateTable instance using the specified properties. * @function create @@ -2702,6 +2720,10 @@ export const api = $root.api = (() => { writer.uint32(/* id 1, wireType 0 =*/8).int32(message.players); if (message.robots != null && Object.hasOwnProperty.call(message, "robots")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.robots); + if (message.texasType != null && Object.hasOwnProperty.call(message, "texasType")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.texasType); + if (message.bigBlind != null && Object.hasOwnProperty.call(message, "bigBlind")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.bigBlind); return writer; }; @@ -2744,6 +2766,14 @@ export const api = $root.api = (() => { message.robots = reader.int32(); break; } + case 3: { + message.texasType = reader.int32(); + break; + } + case 4: { + message.bigBlind = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -2785,6 +2815,12 @@ export const api = $root.api = (() => { if (message.robots != null && message.hasOwnProperty("robots")) if (!$util.isInteger(message.robots)) return "robots: integer expected"; + if (message.texasType != null && message.hasOwnProperty("texasType")) + if (!$util.isInteger(message.texasType)) + return "texasType: integer expected"; + if (message.bigBlind != null && message.hasOwnProperty("bigBlind")) + if (!$util.isInteger(message.bigBlind)) + return "bigBlind: integer expected"; return null; }; @@ -2804,6 +2840,10 @@ export const api = $root.api = (() => { message.players = object.players | 0; if (object.robots != null) message.robots = object.robots | 0; + if (object.texasType != null) + message.texasType = object.texasType | 0; + if (object.bigBlind != null) + message.bigBlind = object.bigBlind | 0; return message; }; @@ -2823,11 +2863,17 @@ export const api = $root.api = (() => { if (options.defaults) { object.players = 0; object.robots = 0; + object.texasType = 0; + object.bigBlind = 0; } if (message.players != null && message.hasOwnProperty("players")) object.players = message.players; if (message.robots != null && message.hasOwnProperty("robots")) object.robots = message.robots; + if (message.texasType != null && message.hasOwnProperty("texasType")) + object.texasType = message.texasType; + if (message.bigBlind != null && message.hasOwnProperty("bigBlind")) + object.bigBlind = message.bigBlind; return object; }; @@ -5243,6 +5289,7 @@ export const api = $root.api = (() => { * @property {number|null} [status] TablePlayer status * @property {number|null} [lastStatus] TablePlayer lastStatus * @property {boolean|null} [master] TablePlayer master + * @property {api.IBetRole|null} [betRole] TablePlayer betRole * @property {Array.|null} [handCard] TablePlayer handCard */ @@ -5326,6 +5373,14 @@ export const api = $root.api = (() => { */ TablePlayer.prototype.master = false; + /** + * TablePlayer betRole. + * @member {api.IBetRole|null|undefined} betRole + * @memberof api.TablePlayer + * @instance + */ + TablePlayer.prototype.betRole = null; + /** * TablePlayer handCard. * @member {Array.} handCard @@ -5374,6 +5429,8 @@ export const api = $root.api = (() => { writer.uint32(/* id 7, wireType 0 =*/56).int32(message.lastStatus); if (message.master != null && Object.hasOwnProperty.call(message, "master")) writer.uint32(/* id 8, wireType 0 =*/64).bool(message.master); + if (message.betRole != null && Object.hasOwnProperty.call(message, "betRole")) + $root.api.BetRole.encode(message.betRole, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); if (message.handCard != null && message.handCard.length) for (let i = 0; i < message.handCard.length; ++i) $root.api.Card.encode(message.handCard[i], writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); @@ -5443,6 +5500,10 @@ export const api = $root.api = (() => { message.master = reader.bool(); break; } + case 14: { + message.betRole = $root.api.BetRole.decode(reader, reader.uint32()); + break; + } case 15: { if (!(message.handCard && message.handCard.length)) message.handCard = []; @@ -5508,6 +5569,11 @@ export const api = $root.api = (() => { if (message.master != null && message.hasOwnProperty("master")) if (typeof message.master !== "boolean") return "master: boolean expected"; + if (message.betRole != null && message.hasOwnProperty("betRole")) { + let error = $root.api.BetRole.verify(message.betRole); + if (error) + return "betRole." + error; + } if (message.handCard != null && message.hasOwnProperty("handCard")) { if (!Array.isArray(message.handCard)) return "handCard: array expected"; @@ -5555,6 +5621,11 @@ export const api = $root.api = (() => { message.lastStatus = object.lastStatus | 0; if (object.master != null) message.master = Boolean(object.master); + if (object.betRole != null) { + if (typeof object.betRole !== "object") + throw TypeError(".api.TablePlayer.betRole: object expected"); + message.betRole = $root.api.BetRole.fromObject(object.betRole); + } if (object.handCard) { if (!Array.isArray(object.handCard)) throw TypeError(".api.TablePlayer.handCard: array expected"); @@ -5596,6 +5667,7 @@ export const api = $root.api = (() => { object.status = 0; object.lastStatus = 0; object.master = false; + object.betRole = null; } if (message.robot != null && message.hasOwnProperty("robot")) object.robot = message.robot; @@ -5616,6 +5688,8 @@ export const api = $root.api = (() => { object.lastStatus = message.lastStatus; if (message.master != null && message.hasOwnProperty("master")) object.master = message.master; + if (message.betRole != null && message.hasOwnProperty("betRole")) + object.betRole = $root.api.BetRole.toObject(message.betRole, options); if (message.handCard && message.handCard.length) { object.handCard = []; for (let j = 0; j < message.handCard.length; ++j) @@ -5880,23 +5954,25 @@ export const api = $root.api = (() => { return Card; })(); - api.ReqGameStart = (function() { + api.BetRole = (function() { /** - * Properties of a ReqGameStart. + * Properties of a BetRole. * @memberof api - * @interface IReqGameStart + * @interface IBetRole + * @property {number|null} [minChip] BetRole minChip + * @property {number|null} [maxChip] BetRole maxChip */ /** - * Constructs a new ReqGameStart. + * Constructs a new BetRole. * @memberof api - * @classdesc Represents a ReqGameStart. - * @implements IReqGameStart + * @classdesc Represents a BetRole. + * @implements IBetRole * @constructor - * @param {api.IReqGameStart=} [properties] Properties to set + * @param {api.IBetRole=} [properties] Properties to set */ - function ReqGameStart(properties) { + function BetRole(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5904,251 +5980,89 @@ export const api = $root.api = (() => { } /** - * Creates a new ReqGameStart instance using the specified properties. - * @function create - * @memberof api.ReqGameStart - * @static - * @param {api.IReqGameStart=} [properties] Properties to set - * @returns {api.ReqGameStart} ReqGameStart instance - */ - ReqGameStart.create = function create(properties) { - return new ReqGameStart(properties); - }; - - /** - * Encodes the specified ReqGameStart message. Does not implicitly {@link api.ReqGameStart.verify|verify} messages. - * @function encode - * @memberof api.ReqGameStart - * @static - * @param {api.IReqGameStart} message ReqGameStart message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReqGameStart.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified ReqGameStart message, length delimited. Does not implicitly {@link api.ReqGameStart.verify|verify} messages. - * @function encodeDelimited - * @memberof api.ReqGameStart - * @static - * @param {api.IReqGameStart} message ReqGameStart message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReqGameStart.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ReqGameStart message from the specified reader or buffer. - * @function decode - * @memberof api.ReqGameStart - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {api.ReqGameStart} ReqGameStart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReqGameStart.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.api.ReqGameStart(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ReqGameStart message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof api.ReqGameStart - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {api.ReqGameStart} ReqGameStart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReqGameStart.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ReqGameStart message. - * @function verify - * @memberof api.ReqGameStart - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ReqGameStart.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a ReqGameStart message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof api.ReqGameStart - * @static - * @param {Object.} object Plain object - * @returns {api.ReqGameStart} ReqGameStart - */ - ReqGameStart.fromObject = function fromObject(object) { - if (object instanceof $root.api.ReqGameStart) - return object; - return new $root.api.ReqGameStart(); - }; - - /** - * Creates a plain object from a ReqGameStart message. Also converts values to other types if specified. - * @function toObject - * @memberof api.ReqGameStart - * @static - * @param {api.ReqGameStart} message ReqGameStart - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ReqGameStart.toObject = function toObject() { - return {}; - }; - - /** - * Converts this ReqGameStart to JSON. - * @function toJSON - * @memberof api.ReqGameStart + * BetRole minChip. + * @member {number} minChip + * @memberof api.BetRole * @instance - * @returns {Object.} JSON object */ - ReqGameStart.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + BetRole.prototype.minChip = 0; /** - * Gets the default type url for ReqGameStart - * @function getTypeUrl - * @memberof api.ReqGameStart - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ReqGameStart.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/api.ReqGameStart"; - }; - - return ReqGameStart; - })(); - - api.ResBigBlindChip = (function() { - - /** - * Properties of a ResBigBlindChip. - * @memberof api - * @interface IResBigBlindChip - * @property {number|null} [chip] ResBigBlindChip chip - */ - - /** - * Constructs a new ResBigBlindChip. - * @memberof api - * @classdesc Represents a ResBigBlindChip. - * @implements IResBigBlindChip - * @constructor - * @param {api.IResBigBlindChip=} [properties] Properties to set - */ - function ResBigBlindChip(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ResBigBlindChip chip. - * @member {number} chip - * @memberof api.ResBigBlindChip + * BetRole maxChip. + * @member {number} maxChip + * @memberof api.BetRole * @instance */ - ResBigBlindChip.prototype.chip = 0; + BetRole.prototype.maxChip = 0; /** - * Creates a new ResBigBlindChip instance using the specified properties. + * Creates a new BetRole instance using the specified properties. * @function create - * @memberof api.ResBigBlindChip + * @memberof api.BetRole * @static - * @param {api.IResBigBlindChip=} [properties] Properties to set - * @returns {api.ResBigBlindChip} ResBigBlindChip instance + * @param {api.IBetRole=} [properties] Properties to set + * @returns {api.BetRole} BetRole instance */ - ResBigBlindChip.create = function create(properties) { - return new ResBigBlindChip(properties); + BetRole.create = function create(properties) { + return new BetRole(properties); }; /** - * Encodes the specified ResBigBlindChip message. Does not implicitly {@link api.ResBigBlindChip.verify|verify} messages. + * Encodes the specified BetRole message. Does not implicitly {@link api.BetRole.verify|verify} messages. * @function encode - * @memberof api.ResBigBlindChip + * @memberof api.BetRole * @static - * @param {api.IResBigBlindChip} message ResBigBlindChip message or plain object to encode + * @param {api.IBetRole} message BetRole message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResBigBlindChip.encode = function encode(message, writer) { + BetRole.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.chip != null && Object.hasOwnProperty.call(message, "chip")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.chip); + if (message.minChip != null && Object.hasOwnProperty.call(message, "minChip")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.minChip); + if (message.maxChip != null && Object.hasOwnProperty.call(message, "maxChip")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.maxChip); return writer; }; /** - * Encodes the specified ResBigBlindChip message, length delimited. Does not implicitly {@link api.ResBigBlindChip.verify|verify} messages. + * Encodes the specified BetRole message, length delimited. Does not implicitly {@link api.BetRole.verify|verify} messages. * @function encodeDelimited - * @memberof api.ResBigBlindChip + * @memberof api.BetRole * @static - * @param {api.IResBigBlindChip} message ResBigBlindChip message or plain object to encode + * @param {api.IBetRole} message BetRole message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResBigBlindChip.encodeDelimited = function encodeDelimited(message, writer) { + BetRole.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ResBigBlindChip message from the specified reader or buffer. + * Decodes a BetRole message from the specified reader or buffer. * @function decode - * @memberof api.ResBigBlindChip + * @memberof api.BetRole * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {api.ResBigBlindChip} ResBigBlindChip + * @returns {api.BetRole} BetRole * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResBigBlindChip.decode = function decode(reader, length) { + BetRole.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.api.ResBigBlindChip(); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.api.BetRole(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.chip = reader.int32(); + message.minChip = reader.int32(); + break; + } + case 2: { + message.maxChip = reader.int32(); break; } default: @@ -6160,122 +6074,130 @@ export const api = $root.api = (() => { }; /** - * Decodes a ResBigBlindChip message from the specified reader or buffer, length delimited. + * Decodes a BetRole message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof api.ResBigBlindChip + * @memberof api.BetRole * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {api.ResBigBlindChip} ResBigBlindChip + * @returns {api.BetRole} BetRole * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResBigBlindChip.decodeDelimited = function decodeDelimited(reader) { + BetRole.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ResBigBlindChip message. + * Verifies a BetRole message. * @function verify - * @memberof api.ResBigBlindChip + * @memberof api.BetRole * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ResBigBlindChip.verify = function verify(message) { + BetRole.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.chip != null && message.hasOwnProperty("chip")) - if (!$util.isInteger(message.chip)) - return "chip: integer expected"; + if (message.minChip != null && message.hasOwnProperty("minChip")) + if (!$util.isInteger(message.minChip)) + return "minChip: integer expected"; + if (message.maxChip != null && message.hasOwnProperty("maxChip")) + if (!$util.isInteger(message.maxChip)) + return "maxChip: integer expected"; return null; }; /** - * Creates a ResBigBlindChip message from a plain object. Also converts values to their respective internal types. + * Creates a BetRole message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof api.ResBigBlindChip + * @memberof api.BetRole * @static * @param {Object.} object Plain object - * @returns {api.ResBigBlindChip} ResBigBlindChip + * @returns {api.BetRole} BetRole */ - ResBigBlindChip.fromObject = function fromObject(object) { - if (object instanceof $root.api.ResBigBlindChip) + BetRole.fromObject = function fromObject(object) { + if (object instanceof $root.api.BetRole) return object; - let message = new $root.api.ResBigBlindChip(); - if (object.chip != null) - message.chip = object.chip | 0; + let message = new $root.api.BetRole(); + if (object.minChip != null) + message.minChip = object.minChip | 0; + if (object.maxChip != null) + message.maxChip = object.maxChip | 0; return message; }; /** - * Creates a plain object from a ResBigBlindChip message. Also converts values to other types if specified. + * Creates a plain object from a BetRole message. Also converts values to other types if specified. * @function toObject - * @memberof api.ResBigBlindChip + * @memberof api.BetRole * @static - * @param {api.ResBigBlindChip} message ResBigBlindChip + * @param {api.BetRole} message BetRole * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ResBigBlindChip.toObject = function toObject(message, options) { + BetRole.toObject = function toObject(message, options) { if (!options) options = {}; let object = {}; - if (options.defaults) - object.chip = 0; - if (message.chip != null && message.hasOwnProperty("chip")) - object.chip = message.chip; + if (options.defaults) { + object.minChip = 0; + object.maxChip = 0; + } + if (message.minChip != null && message.hasOwnProperty("minChip")) + object.minChip = message.minChip; + if (message.maxChip != null && message.hasOwnProperty("maxChip")) + object.maxChip = message.maxChip; return object; }; /** - * Converts this ResBigBlindChip to JSON. + * Converts this BetRole to JSON. * @function toJSON - * @memberof api.ResBigBlindChip + * @memberof api.BetRole * @instance * @returns {Object.} JSON object */ - ResBigBlindChip.prototype.toJSON = function toJSON() { + BetRole.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ResBigBlindChip + * Gets the default type url for BetRole * @function getTypeUrl - * @memberof api.ResBigBlindChip + * @memberof api.BetRole * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ResBigBlindChip.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + BetRole.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/api.ResBigBlindChip"; + return typeUrlPrefix + "/api.BetRole"; }; - return ResBigBlindChip; + return BetRole; })(); - api.ResSmallBlindChip = (function() { + api.ReqGameStart = (function() { /** - * Properties of a ResSmallBlindChip. + * Properties of a ReqGameStart. * @memberof api - * @interface IResSmallBlindChip - * @property {number|null} [chip] ResSmallBlindChip chip + * @interface IReqGameStart */ /** - * Constructs a new ResSmallBlindChip. + * Constructs a new ReqGameStart. * @memberof api - * @classdesc Represents a ResSmallBlindChip. - * @implements IResSmallBlindChip + * @classdesc Represents a ReqGameStart. + * @implements IReqGameStart * @constructor - * @param {api.IResSmallBlindChip=} [properties] Properties to set + * @param {api.IReqGameStart=} [properties] Properties to set */ - function ResSmallBlindChip(properties) { + function ReqGameStart(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6283,77 +6205,63 @@ export const api = $root.api = (() => { } /** - * ResSmallBlindChip chip. - * @member {number} chip - * @memberof api.ResSmallBlindChip - * @instance - */ - ResSmallBlindChip.prototype.chip = 0; - - /** - * Creates a new ResSmallBlindChip instance using the specified properties. + * Creates a new ReqGameStart instance using the specified properties. * @function create - * @memberof api.ResSmallBlindChip + * @memberof api.ReqGameStart * @static - * @param {api.IResSmallBlindChip=} [properties] Properties to set - * @returns {api.ResSmallBlindChip} ResSmallBlindChip instance + * @param {api.IReqGameStart=} [properties] Properties to set + * @returns {api.ReqGameStart} ReqGameStart instance */ - ResSmallBlindChip.create = function create(properties) { - return new ResSmallBlindChip(properties); + ReqGameStart.create = function create(properties) { + return new ReqGameStart(properties); }; /** - * Encodes the specified ResSmallBlindChip message. Does not implicitly {@link api.ResSmallBlindChip.verify|verify} messages. + * Encodes the specified ReqGameStart message. Does not implicitly {@link api.ReqGameStart.verify|verify} messages. * @function encode - * @memberof api.ResSmallBlindChip + * @memberof api.ReqGameStart * @static - * @param {api.IResSmallBlindChip} message ResSmallBlindChip message or plain object to encode + * @param {api.IReqGameStart} message ReqGameStart message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResSmallBlindChip.encode = function encode(message, writer) { + ReqGameStart.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.chip != null && Object.hasOwnProperty.call(message, "chip")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.chip); return writer; }; /** - * Encodes the specified ResSmallBlindChip message, length delimited. Does not implicitly {@link api.ResSmallBlindChip.verify|verify} messages. + * Encodes the specified ReqGameStart message, length delimited. Does not implicitly {@link api.ReqGameStart.verify|verify} messages. * @function encodeDelimited - * @memberof api.ResSmallBlindChip + * @memberof api.ReqGameStart * @static - * @param {api.IResSmallBlindChip} message ResSmallBlindChip message or plain object to encode + * @param {api.IReqGameStart} message ReqGameStart message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResSmallBlindChip.encodeDelimited = function encodeDelimited(message, writer) { + ReqGameStart.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ResSmallBlindChip message from the specified reader or buffer. + * Decodes a ReqGameStart message from the specified reader or buffer. * @function decode - * @memberof api.ResSmallBlindChip + * @memberof api.ReqGameStart * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {api.ResSmallBlindChip} ResSmallBlindChip + * @returns {api.ReqGameStart} ReqGameStart * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResSmallBlindChip.decode = function decode(reader, length) { + ReqGameStart.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.api.ResSmallBlindChip(); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.api.ReqGameStart(); while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.chip = reader.int32(); - break; - } default: reader.skipType(tag & 7); break; @@ -6363,102 +6271,89 @@ export const api = $root.api = (() => { }; /** - * Decodes a ResSmallBlindChip message from the specified reader or buffer, length delimited. + * Decodes a ReqGameStart message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof api.ResSmallBlindChip + * @memberof api.ReqGameStart * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {api.ResSmallBlindChip} ResSmallBlindChip + * @returns {api.ReqGameStart} ReqGameStart * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResSmallBlindChip.decodeDelimited = function decodeDelimited(reader) { + ReqGameStart.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ResSmallBlindChip message. + * Verifies a ReqGameStart message. * @function verify - * @memberof api.ResSmallBlindChip + * @memberof api.ReqGameStart * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ResSmallBlindChip.verify = function verify(message) { + ReqGameStart.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.chip != null && message.hasOwnProperty("chip")) - if (!$util.isInteger(message.chip)) - return "chip: integer expected"; return null; }; /** - * Creates a ResSmallBlindChip message from a plain object. Also converts values to their respective internal types. + * Creates a ReqGameStart message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof api.ResSmallBlindChip + * @memberof api.ReqGameStart * @static * @param {Object.} object Plain object - * @returns {api.ResSmallBlindChip} ResSmallBlindChip + * @returns {api.ReqGameStart} ReqGameStart */ - ResSmallBlindChip.fromObject = function fromObject(object) { - if (object instanceof $root.api.ResSmallBlindChip) + ReqGameStart.fromObject = function fromObject(object) { + if (object instanceof $root.api.ReqGameStart) return object; - let message = new $root.api.ResSmallBlindChip(); - if (object.chip != null) - message.chip = object.chip | 0; - return message; + return new $root.api.ReqGameStart(); }; /** - * Creates a plain object from a ResSmallBlindChip message. Also converts values to other types if specified. + * Creates a plain object from a ReqGameStart message. Also converts values to other types if specified. * @function toObject - * @memberof api.ResSmallBlindChip + * @memberof api.ReqGameStart * @static - * @param {api.ResSmallBlindChip} message ResSmallBlindChip + * @param {api.ReqGameStart} message ReqGameStart * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ResSmallBlindChip.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) - object.chip = 0; - if (message.chip != null && message.hasOwnProperty("chip")) - object.chip = message.chip; - return object; + ReqGameStart.toObject = function toObject() { + return {}; }; /** - * Converts this ResSmallBlindChip to JSON. + * Converts this ReqGameStart to JSON. * @function toJSON - * @memberof api.ResSmallBlindChip + * @memberof api.ReqGameStart * @instance * @returns {Object.} JSON object */ - ResSmallBlindChip.prototype.toJSON = function toJSON() { + ReqGameStart.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ResSmallBlindChip + * Gets the default type url for ReqGameStart * @function getTypeUrl - * @memberof api.ResSmallBlindChip + * @memberof api.ReqGameStart * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ResSmallBlindChip.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ReqGameStart.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/api.ResSmallBlindChip"; + return typeUrlPrefix + "/api.ReqGameStart"; }; - return ResSmallBlindChip; + return ReqGameStart; })(); api.ReqDismissGameTable = (function() { @@ -6817,7 +6712,8 @@ export const api = $root.api = (() => { * Properties of a ReqPlaceBetChip. * @memberof api * @interface IReqPlaceBetChip - * @property {number|null} [chip] ReqPlaceBetChip chip + * @property {number|null} [betChip] ReqPlaceBetChip betChip + * @property {boolean|null} [allIn] ReqPlaceBetChip allIn */ /** @@ -6836,12 +6732,20 @@ export const api = $root.api = (() => { } /** - * ReqPlaceBetChip chip. - * @member {number} chip + * ReqPlaceBetChip betChip. + * @member {number} betChip * @memberof api.ReqPlaceBetChip * @instance */ - ReqPlaceBetChip.prototype.chip = 0; + ReqPlaceBetChip.prototype.betChip = 0; + + /** + * ReqPlaceBetChip allIn. + * @member {boolean} allIn + * @memberof api.ReqPlaceBetChip + * @instance + */ + ReqPlaceBetChip.prototype.allIn = false; /** * Creates a new ReqPlaceBetChip instance using the specified properties. @@ -6867,8 +6771,10 @@ export const api = $root.api = (() => { ReqPlaceBetChip.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.chip != null && Object.hasOwnProperty.call(message, "chip")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.chip); + if (message.betChip != null && Object.hasOwnProperty.call(message, "betChip")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.betChip); + if (message.allIn != null && Object.hasOwnProperty.call(message, "allIn")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allIn); return writer; }; @@ -6904,7 +6810,11 @@ export const api = $root.api = (() => { let tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.chip = reader.int32(); + message.betChip = reader.int32(); + break; + } + case 2: { + message.allIn = reader.bool(); break; } default: @@ -6942,9 +6852,12 @@ export const api = $root.api = (() => { ReqPlaceBetChip.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.chip != null && message.hasOwnProperty("chip")) - if (!$util.isInteger(message.chip)) - return "chip: integer expected"; + if (message.betChip != null && message.hasOwnProperty("betChip")) + if (!$util.isInteger(message.betChip)) + return "betChip: integer expected"; + if (message.allIn != null && message.hasOwnProperty("allIn")) + if (typeof message.allIn !== "boolean") + return "allIn: boolean expected"; return null; }; @@ -6960,8 +6873,10 @@ export const api = $root.api = (() => { if (object instanceof $root.api.ReqPlaceBetChip) return object; let message = new $root.api.ReqPlaceBetChip(); - if (object.chip != null) - message.chip = object.chip | 0; + if (object.betChip != null) + message.betChip = object.betChip | 0; + if (object.allIn != null) + message.allIn = Boolean(object.allIn); return message; }; @@ -6978,10 +6893,14 @@ export const api = $root.api = (() => { if (!options) options = {}; let object = {}; - if (options.defaults) - object.chip = 0; - if (message.chip != null && message.hasOwnProperty("chip")) - object.chip = message.chip; + if (options.defaults) { + object.betChip = 0; + object.allIn = false; + } + if (message.betChip != null && message.hasOwnProperty("betChip")) + object.betChip = message.betChip; + if (message.allIn != null && message.hasOwnProperty("allIn")) + object.allIn = message.allIn; return object; }; @@ -7364,6 +7283,293 @@ export const api = $root.api = (() => { return ReqBetDiscard; })(); + api.ResNoticePlayerLine = (function() { + + /** + * Properties of a ResNoticePlayerLine. + * @memberof api + * @interface IResNoticePlayerLine + * @property {number|Long|null} [playerId] ResNoticePlayerLine playerId + * @property {string|null} [line1] ResNoticePlayerLine line1 + * @property {string|null} [line2] ResNoticePlayerLine line2 + * @property {string|null} [line3] ResNoticePlayerLine line3 + */ + + /** + * Constructs a new ResNoticePlayerLine. + * @memberof api + * @classdesc Represents a ResNoticePlayerLine. + * @implements IResNoticePlayerLine + * @constructor + * @param {api.IResNoticePlayerLine=} [properties] Properties to set + */ + function ResNoticePlayerLine(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResNoticePlayerLine playerId. + * @member {number|Long} playerId + * @memberof api.ResNoticePlayerLine + * @instance + */ + ResNoticePlayerLine.prototype.playerId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * ResNoticePlayerLine line1. + * @member {string} line1 + * @memberof api.ResNoticePlayerLine + * @instance + */ + ResNoticePlayerLine.prototype.line1 = ""; + + /** + * ResNoticePlayerLine line2. + * @member {string} line2 + * @memberof api.ResNoticePlayerLine + * @instance + */ + ResNoticePlayerLine.prototype.line2 = ""; + + /** + * ResNoticePlayerLine line3. + * @member {string} line3 + * @memberof api.ResNoticePlayerLine + * @instance + */ + ResNoticePlayerLine.prototype.line3 = ""; + + /** + * Creates a new ResNoticePlayerLine instance using the specified properties. + * @function create + * @memberof api.ResNoticePlayerLine + * @static + * @param {api.IResNoticePlayerLine=} [properties] Properties to set + * @returns {api.ResNoticePlayerLine} ResNoticePlayerLine instance + */ + ResNoticePlayerLine.create = function create(properties) { + return new ResNoticePlayerLine(properties); + }; + + /** + * Encodes the specified ResNoticePlayerLine message. Does not implicitly {@link api.ResNoticePlayerLine.verify|verify} messages. + * @function encode + * @memberof api.ResNoticePlayerLine + * @static + * @param {api.IResNoticePlayerLine} message ResNoticePlayerLine message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResNoticePlayerLine.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.playerId != null && Object.hasOwnProperty.call(message, "playerId")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.playerId); + if (message.line1 != null && Object.hasOwnProperty.call(message, "line1")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.line1); + if (message.line2 != null && Object.hasOwnProperty.call(message, "line2")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.line2); + if (message.line3 != null && Object.hasOwnProperty.call(message, "line3")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.line3); + return writer; + }; + + /** + * Encodes the specified ResNoticePlayerLine message, length delimited. Does not implicitly {@link api.ResNoticePlayerLine.verify|verify} messages. + * @function encodeDelimited + * @memberof api.ResNoticePlayerLine + * @static + * @param {api.IResNoticePlayerLine} message ResNoticePlayerLine message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResNoticePlayerLine.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResNoticePlayerLine message from the specified reader or buffer. + * @function decode + * @memberof api.ResNoticePlayerLine + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {api.ResNoticePlayerLine} ResNoticePlayerLine + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResNoticePlayerLine.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.api.ResNoticePlayerLine(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.playerId = reader.int64(); + break; + } + case 11: { + message.line1 = reader.string(); + break; + } + case 12: { + message.line2 = reader.string(); + break; + } + case 13: { + message.line3 = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResNoticePlayerLine message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof api.ResNoticePlayerLine + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {api.ResNoticePlayerLine} ResNoticePlayerLine + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResNoticePlayerLine.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResNoticePlayerLine message. + * @function verify + * @memberof api.ResNoticePlayerLine + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResNoticePlayerLine.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.playerId != null && message.hasOwnProperty("playerId")) + if (!$util.isInteger(message.playerId) && !(message.playerId && $util.isInteger(message.playerId.low) && $util.isInteger(message.playerId.high))) + return "playerId: integer|Long expected"; + if (message.line1 != null && message.hasOwnProperty("line1")) + if (!$util.isString(message.line1)) + return "line1: string expected"; + if (message.line2 != null && message.hasOwnProperty("line2")) + if (!$util.isString(message.line2)) + return "line2: string expected"; + if (message.line3 != null && message.hasOwnProperty("line3")) + if (!$util.isString(message.line3)) + return "line3: string expected"; + return null; + }; + + /** + * Creates a ResNoticePlayerLine message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof api.ResNoticePlayerLine + * @static + * @param {Object.} object Plain object + * @returns {api.ResNoticePlayerLine} ResNoticePlayerLine + */ + ResNoticePlayerLine.fromObject = function fromObject(object) { + if (object instanceof $root.api.ResNoticePlayerLine) + return object; + let message = new $root.api.ResNoticePlayerLine(); + if (object.playerId != null) + if ($util.Long) + (message.playerId = $util.Long.fromValue(object.playerId)).unsigned = false; + else if (typeof object.playerId === "string") + message.playerId = parseInt(object.playerId, 10); + else if (typeof object.playerId === "number") + message.playerId = object.playerId; + else if (typeof object.playerId === "object") + message.playerId = new $util.LongBits(object.playerId.low >>> 0, object.playerId.high >>> 0).toNumber(); + if (object.line1 != null) + message.line1 = String(object.line1); + if (object.line2 != null) + message.line2 = String(object.line2); + if (object.line3 != null) + message.line3 = String(object.line3); + return message; + }; + + /** + * Creates a plain object from a ResNoticePlayerLine message. Also converts values to other types if specified. + * @function toObject + * @memberof api.ResNoticePlayerLine + * @static + * @param {api.ResNoticePlayerLine} message ResNoticePlayerLine + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResNoticePlayerLine.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + if ($util.Long) { + let long = new $util.Long(0, 0, false); + object.playerId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.playerId = options.longs === String ? "0" : 0; + object.line1 = ""; + object.line2 = ""; + object.line3 = ""; + } + if (message.playerId != null && message.hasOwnProperty("playerId")) + if (typeof message.playerId === "number") + object.playerId = options.longs === String ? String(message.playerId) : message.playerId; + else + object.playerId = options.longs === String ? $util.Long.prototype.toString.call(message.playerId) : options.longs === Number ? new $util.LongBits(message.playerId.low >>> 0, message.playerId.high >>> 0).toNumber() : message.playerId; + if (message.line1 != null && message.hasOwnProperty("line1")) + object.line1 = message.line1; + if (message.line2 != null && message.hasOwnProperty("line2")) + object.line2 = message.line2; + if (message.line3 != null && message.hasOwnProperty("line3")) + object.line3 = message.line3; + return object; + }; + + /** + * Converts this ResNoticePlayerLine to JSON. + * @function toJSON + * @memberof api.ResNoticePlayerLine + * @instance + * @returns {Object.} JSON object + */ + ResNoticePlayerLine.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResNoticePlayerLine + * @function getTypeUrl + * @memberof api.ResNoticePlayerLine + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResNoticePlayerLine.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/api.ResNoticePlayerLine"; + }; + + return ResNoticePlayerLine; + })(); + return api; })(); diff --git a/internal/game/game.go b/internal/game/game.go index 2aab40f..7eff928 100644 --- a/internal/game/game.go +++ b/internal/game/game.go @@ -5,11 +5,6 @@ import ( "sync" ) -const ( - BigBlindChip int32 = 2 // 大盲注金额 - SmallBlinds int32 = BigBlindChip / 2 // 小盲注金额 -) - // Dealer 发牌员, 有打乱的一副牌 type Dealer struct { // 一副牌 diff --git a/internal/game/player.go b/internal/game/player.go index d27a223..4a76d09 100644 --- a/internal/game/player.go +++ b/internal/game/player.go @@ -7,14 +7,18 @@ import ( // Player 游戏玩家 type Player struct { - Id int64 - Username string - Avatar string - Cards [2]*Card // 手牌 - Chip int32 // 玩家筹码 - RoundChip int32 // 该回合已下注筹码 - Status int32 // 状态: 1待准备开始,2已准备开始,3等待其他玩家动作,4第一回合小盲注跟注, [5待大盲注,5待小盲注,] 6待跟注,7已弃牌 - LastStatus int32 // 变化前一个状态 + Id int64 + Username string + Avatar string + Cards [2]*Card // 手牌 + Chip int32 // 玩家筹码 + RoundChip int32 // 该回合已下注筹码 + Status int32 // 状态: 1待准备开始,2已准备开始,3等待其他玩家动作,4第一回合小盲注跟注, [5待大盲注,5待小盲注,] 6待跟注,7已弃牌 + LastStatus int32 // 变化前一个状态 + BetOpts []int32 // status=[4,6]时下注可操作按钮: 1跟注,2加注(-[0]+),3All-In,4弃牌,5过牌 + BetMin int32 // 最低下注额 + BetMax int32 // 最高下注额 -1不限 + RoundBetTimes int32 // 当前回合下注次数 GameTable *Table // 当前牌桌 ProtoWriter letter.ProtoWriter diff --git a/internal/game/table.go b/internal/game/table.go index 98b8a0d..527f1f1 100644 --- a/internal/game/table.go +++ b/internal/game/table.go @@ -2,6 +2,7 @@ package game import ( "errors" + "github.com/golang/protobuf/proto" "sync" "texas-poker-bk/api" "texas-poker-bk/tool/collect" @@ -18,20 +19,36 @@ type Table struct { Dealer *Dealer // 发牌员 PublicCards [5]*Card // 公共牌 - PlayerNum int32 // 玩家数 - RobotNum int32 // 机器人数 - Players []*Player // 玩家 - Robots []*Robot - BigBlindPos int // 大盲注位 - SmallBlindPos int // 小盲注位 - BigBlindChip int32 // 大盲注金额 - TexasType int32 // 德州扑克类型: (1限注德州扑克:你只能增加与大盲注相同的投注额; 2底池限制德州扑克:你只能增加当时台面最大额的投注额(已经完成所有投注); 3无限制德州扑克:你可在手持额度下,增加任何额度的投注额,如果你投入所有筹码,就是“全押”) + PlayerNum int32 // 玩家数 + RobotNum int32 // 机器人数 + Players []*Player // 玩家 + Robots []*Robot + BigBlindPos int // 大盲注位 + SmallBlindPos int // 小盲注位 + BigBlindChip int32 // 大盲注金额 + SmallBlindChip int32 // 大盲注金额 + TexasType int32 // 德州扑克类型: (1限注德州扑克:你只能增加与大盲注相同的投注额; 2底池限制德州扑克:你只能增加当时台面最大额的投注额(已经完成所有投注); 3无限制德州扑克:你可在手持额度下,增加任何额度的投注额,如果你投入所有筹码,就是“全押”) + LimitInAmount int32 // 最低入场金额 + + LastPosBetChip int32 // 上家下注金额 PlayersLock *sync.Mutex ChipLock *sync.Mutex // 桌面筹码更新锁 // TODO game logs7 } +// Init 初始化桌面 +func (t *Table) Init() { + t.PlayersLock = &sync.Mutex{} + t.ChipLock = &sync.Mutex{} + t.PublicCards = [5]*Card{nil, nil, nil, nil, nil} + t.Dealer = NewDealer() + t.RoundTimes = 0 + t.Stage = 1 + t.BigBlindPos = 0 + t.SmallBlindPos = 0 +} + func (t *Table) PlayerCount() int32 { var count int32 = 0 for _, p := range t.Players { @@ -42,7 +59,7 @@ func (t *Table) PlayerCount() int32 { return count } -func (t *Table) NextPosPlayer(current int) int { +func (t *Table) NextPlayerPos(current int) int { for i := current + 1; i < len(t.Players); i++ { if t.Players[i] == nil { continue @@ -57,14 +74,14 @@ func (t *Table) NextPosPlayer(current int) int { return 0 } -func (t *Table) FindPlayerPos(player *Player) int32 { - for i, p := range t.Players { - if p != nil && p.Id == player.Id { - return int32(i) - } - } - return -1 -} +//func (t *Table) FindPlayerPos(player *Player) int32 { +// for i, p := range t.Players { +// if p != nil && p.Id == player.Id { +// return int32(i) +// } +// } +// return -1 +//} func (t *Table) JoinPlayer(player *Player) error { t.PlayersLock.Lock() @@ -151,6 +168,14 @@ func (t *Table) NoticeGameFullStatus() { } } +func (t *Table) NoticeAllPlayer(message proto.Message) { + for _, player := range t.Players { + if player != nil && player.ProtoWriter != nil { + player.ProtoWriter.Write(message) + } + } +} + // NoticeGamePlayerCall TODO 发送(下注信息、下注人、下一位下注人)到牌桌所有用户 //func (t *Table) NoticeGamePlayerCall() { // diff --git a/internal/service/table.go b/internal/service/table.go index 55e46df..6f0994a 100644 --- a/internal/service/table.go +++ b/internal/service/table.go @@ -4,7 +4,6 @@ import ( "fmt" "github.com/golang/protobuf/proto" "sort" - "sync" "texas-poker-bk/api" "texas-poker-bk/internal/game" "texas-poker-bk/internal/service/store" @@ -12,50 +11,62 @@ import ( "texas-poker-bk/tool/collect" ) -// HandleReqCreateTable 创建桌面 TODO 当前在房间则不可创建房间了 +// HandleReqCreateTable 创建桌面 func HandleReqCreateTable(account *session.NetAccount, msg *api.ReqCreateTable) (proto.Message, error) { + account.Lock.Lock() + defer account.Lock.Unlock() + + if account.Player != nil { + return &api.ResFail{Msg: fmt.Sprintf("您当前在#%d牌桌中", account.Player.GameTable.TableNo)}, nil + } // 人数,机器人数 playerNum := msg.Players robotNum := msg.Robots if playerNum+robotNum <= 0 { return &api.ResFail{Msg: "至少添加一个玩家或机器人"}, nil } + if !collect.In(msg.TexasType, 1, 2, 3) { + return &api.ResFail{Msg: fmt.Sprintf("未知游戏类型%d", msg.TexasType)}, nil + } + if msg.BigBlind < 2 || msg.BigBlind > 200 || msg.BigBlind%2 == 1 { + return &api.ResFail{Msg: "大盲注金额需在2-200之间,且为偶数"}, nil + } + if account.GetBalance() < msg.BigBlind*100 { + return &api.ResFail{Msg: fmt.Sprintf("余额小于入场金额[%d]", msg.BigBlind*100)}, nil + } // 初始化一个牌桌 table := &game.Table{ - TableNo: store.TableNo.Add(1), - MasterId: account.Id, - RoundTimes: 0, - Stage: 1, - - Dealer: game.NewDealer(), - PublicCards: [5]*game.Card{nil, nil, nil, nil, nil}, //&game.Card{Dot: 0, Suit: 3}, &game.Card{Dot: 1, Suit: 3} + TableNo: store.TableNo.Add(1), + MasterId: account.Id, - PlayerNum: playerNum + 1, - RobotNum: robotNum, - Players: make([]*game.Player, playerNum+1), - Robots: make([]*game.Robot, robotNum), - BigBlindPos: 0, - SmallBlindPos: 0, - PlayersLock: &sync.Mutex{}, - ChipLock: &sync.Mutex{}, + PlayerNum: playerNum + 1, + RobotNum: robotNum, + Players: make([]*game.Player, playerNum+1), + Robots: make([]*game.Robot, robotNum), + BigBlindChip: msg.BigBlind, + SmallBlindChip: msg.BigBlind / 2, + LimitInAmount: msg.BigBlind * 100, + TexasType: msg.TexasType, } + table.Init() // 房主 [0] + // 扣除DB账户余额 + account.DecrementBalance(table.LimitInAmount) owner := &game.Player{ Id: account.Id, Username: account.UserName, Avatar: account.Avatar, Status: 1, LastStatus: 0, - Chip: 500, + Chip: table.LimitInAmount, Cards: [2]*game.Card{}, GameTable: table, ProtoWriter: account.Client, } owner.Init() - // 扣除DB账户余额 TODO 账户金额限制 - account.DecrementBalance(500) - account.Player = owner // 挂载 player 到 account 上 + // 挂载 player 到 account 上 + account.Player = owner table.Players[0] = owner for i := 0; i < int(robotNum); i++ { @@ -120,8 +131,6 @@ func HandleReqJoinTable(account *session.NetAccount, msg *api.ReqJoinTable) (pro if account.Player != nil { return &api.ResFail{Msg: fmt.Sprintf("当前已加入#%d牌桌", account.Player.GameTable.TableNo)}, nil } - // account -> player - // TODO 账户余额限制 table := store.LobbyTables[msg.TableNo] table.ChipLock.Lock() @@ -132,13 +141,18 @@ func HandleReqJoinTable(account *session.NetAccount, msg *api.ReqJoinTable) (pro if table.Stage != 1 { return &api.ResFail{Msg: "牌桌正在进行中"}, nil } + // 账户余额限制 + if account.GetBalance() < table.LimitInAmount { + return &api.ResFail{Msg: fmt.Sprintf("余额小于入场金额[%d]", table.LimitInAmount)}, nil + } + player := &game.Player{ Id: account.Id, Username: account.UserName, Avatar: account.Avatar, Status: 1, LastStatus: 0, - Chip: 500, + Chip: 0, Cards: [2]*game.Card{nil, nil}, GameTable: table, ProtoWriter: account.Client, @@ -149,7 +163,8 @@ func HandleReqJoinTable(account *session.NetAccount, msg *api.ReqJoinTable) (pro return nil, err } // 从账户扣除进入牌桌的金额 - account.DecrementBalance(500) + account.DecrementBalance(table.LimitInAmount) + player.Chip = table.LimitInAmount account.Player = player // 通知其他玩家 @@ -275,6 +290,7 @@ func HandleReqCancelReady(player *game.Player, msg *api.ReqCancelReady) (proto.M return &api.ResSuccess{}, nil } +// HandleReqDismissGameTable 解散牌桌 func HandleReqDismissGameTable(player *game.Player, msg *api.ReqDismissGameTable) (proto.Message, error) { player.GameTable.ChipLock.Lock() defer player.GameTable.ChipLock.Unlock() @@ -299,6 +315,7 @@ func HandleReqDismissGameTable(player *game.Player, msg *api.ReqDismissGameTable return &api.ResDismissGameTable{}, nil } +// HandleReqGameStart 游戏开始,初始化,扣除大小盲注,每个玩家发2张牌 func HandleReqGameStart(player *game.Player, msg *api.ReqGameStart) (proto.Message, error) { player.GameTable.ChipLock.Lock() defer player.GameTable.ChipLock.Unlock() @@ -326,24 +343,43 @@ func HandleReqGameStart(player *game.Player, msg *api.ReqGameStart) (proto.Messa // 游戏状态开始 table.Stage = 2 - // 大盲注位 + // 小盲注位 if table.RoundTimes == 0 { - table.BigBlindPos = 0 + // 第一轮由庄家左手边第一个作为小盲注 + table.SmallBlindPos = table.NextPlayerPos(0) } else { - table.BigBlindPos = table.NextPosPlayer(table.BigBlindPos) + table.SmallBlindPos = table.NextPlayerPos(table.SmallBlindPos) } - // 小盲注位 - table.SmallBlindPos = table.NextPosPlayer(table.BigBlindPos) + // 大盲注位 + table.BigBlindPos = table.NextPlayerPos(table.SmallBlindPos) // 回合数+1 table.RoundTimes++ // 扣除大小盲注金额 - table.Players[table.BigBlindPos].Chip -= game.BigBlindChip - table.Players[table.SmallBlindPos].Chip -= game.SmallBlinds - table.Chip += game.BigBlindChip + game.SmallBlinds - - table.Players[table.BigBlindPos].ProtoWriter.Write(&api.ResBigBlindChip{Chip: game.BigBlindChip}) - table.Players[table.SmallBlindPos].ProtoWriter.Write(&api.ResSmallBlindChip{Chip: game.SmallBlinds}) + table.Players[table.SmallBlindPos].Chip -= table.SmallBlindChip + table.Players[table.BigBlindPos].Chip -= table.BigBlindChip + table.Chip += table.BigBlindChip + table.SmallBlindChip + // 回合下注次数 + table.Players[table.BigBlindPos].RoundBetTimes++ + // table.Players[table.SmallBlindPos].RoundBetTimes++ + + // 初始上次下注金额为大盲注 + table.LastPosBetChip = table.BigBlindChip + + msgSmallBlind := &api.ResNoticePlayerLine{ + PlayerId: table.Players[table.SmallBlindPos].Id, + Line1: fmt.Sprintf("+%d", table.SmallBlindChip), + Line2: "小盲注", + } + msgBigBlind := &api.ResNoticePlayerLine{ + PlayerId: table.Players[table.BigBlindPos].Id, + Line1: fmt.Sprintf("+%d", table.BigBlindChip), + Line2: "大盲注", + } + table.NoticeAllPlayer(msgSmallBlind) + table.NoticeAllPlayer(msgBigBlind) + //table.Players[table.BigBlindPos].ProtoWriter.Write(&api.ResBigBlindChip{Chip: game.BigBlindChip}) + //table.Players[table.SmallBlindPos].ProtoWriter.Write(&api.ResSmallBlindChip{Chip: game.SmallBlinds}) // 开始发牌(手牌,公共牌) table.Dealer.Init() // 初始化发牌员 @@ -358,16 +394,59 @@ func HandleReqGameStart(player *game.Player, msg *api.ReqGameStart) (proto.Messa p.SetStatus(3) } // 发3张公共牌 - for i := 0; i < 5; i++ { - if i < 3 { - table.PublicCards[i] = table.Dealer.Deal() - continue + //for i := 0; i < 5; i++ { + // if i < 3 { + // table.PublicCards[i] = table.Dealer.Deal() + // continue + // } + // // 第4,5张牌置空 + // table.PublicCards[i] = nil + //} + + // 待大盲注位下一位玩家下注 + optPos := table.NextPlayerPos(table.BigBlindPos) + optPlayer := table.Players[optPos] + optPlayer.SetStatus(4) + optPlayer.BetOpts = []int32{1, 2, 4} + optPlayer.BetMax = table.BigBlindChip + // 游戏类型处理最大下注额 + switch table.TexasType { + case 2: // 底池限注 + optPlayer.BetMax = table.Chip + table.LastPosBetChip*2 + case 3: // 无限注 + optPlayer.BetOpts = append(optPlayer.BetOpts, 3) // 可 all in + optPlayer.BetMax = -1 + case 1: // 限注 + fallthrough + default: + // 第1,2回合跟注加注需和大盲注相同, 3,4回合两倍 + optPlayer.BetMax = table.BigBlindChip * 2 + } + // 根据玩家类型计算最小下注额,最大下注额 + switch optPos { + case table.SmallBlindPos: + optPlayer.BetMin = table.BigBlindChip - table.SmallBlindChip + if table.TexasType != 3 { + optPlayer.BetMax = optPlayer.BetMax - optPlayer.BetMin + } + case table.BigBlindPos: + optPlayer.BetMin = 0 + optPlayer.BetOpts = append(optPlayer.BetOpts, 5) + if table.TexasType != 3 { + optPlayer.BetMax = optPlayer.BetMax - table.BigBlindChip + } + default: + optPlayer.BetMin = table.BigBlindChip + } + // 其他玩家暂不可操作 + for pos, p := range table.Players { + if p != nil && pos != optPos { + p.Status = 3 + p.BetOpts = make([]int32, 0) + p.BetMin = 0 + p.BetMax = 0 } - // 第4,5张牌置空 - table.PublicCards[i] = nil } - // 待小盲注位玩家下注 - table.Players[table.SmallBlindPos].SetStatus(4) // 广播牌桌状态 table.NoticeGameFullStatus() @@ -393,11 +472,11 @@ func HandleReqPlaceBetChip(player *game.Player, msg *api.ReqPlaceBetChip) (proto } switch player.Status { case 4: // 小盲注下注,下注金额最小大盲注1半, - if msg.Chip < player.GameTable.BigBlindChip/2 { + if msg.BetChip < player.GameTable.BigBlindChip/2 { return &api.ResFail{Msg: fmt.Sprintf("您当前最小下注金额%d", player.GameTable.BigBlindChip/2)}, nil } case 6: // 轮流下注,下注金额最小大盲注 - if msg.Chip < player.GameTable.BigBlindChip { + if msg.BetChip < player.GameTable.BigBlindChip { return &api.ResFail{Msg: fmt.Sprintf("您当前最小下注金额%d", player.GameTable.BigBlindChip)}, nil } default: @@ -424,17 +503,17 @@ func HandleReqPlaceBetChip(player *game.Player, msg *api.ReqPlaceBetChip) (proto if player.GameTable.TexasType == 3 { // 无限制可All In - allIn = msg.Chip == maxBetChip + allIn = msg.BetChip == maxBetChip } else if player.Status == 4 { // 最大金额减去小盲注金额 maxBetChip -= player.GameTable.BigBlindChip / 2 } - if msg.Chip > maxBetChip { + if msg.BetChip > maxBetChip { return &api.ResFail{Msg: fmt.Sprintf("您当前最大下注金额%d", maxBetChip)}, nil } - player.Chip -= msg.Chip + player.Chip -= msg.BetChip return nil, nil }