diff --git a/api/poker.pb.go b/api/poker.pb.go index c9e23ce..023d71a 100644 --- a/api/poker.pb.go +++ b/api/poker.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.1 -// protoc v3.17.3 +// protoc v3.21.12 // source: poker.proto package api @@ -454,7 +454,8 @@ type ResLobbyView struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Tables []*LobbyTable `protobuf:"bytes,3,rep,name=tables,proto3" json:"tables,omitempty"` + CurTableNo int32 `protobuf:"varint,1,opt,name=curTableNo,proto3" json:"curTableNo,omitempty"` + Tables []*LobbyTable `protobuf:"bytes,3,rep,name=tables,proto3" json:"tables,omitempty"` } func (x *ResLobbyView) Reset() { @@ -489,6 +490,13 @@ func (*ResLobbyView) Descriptor() ([]byte, []int) { return file_poker_proto_rawDescGZIP(), []int{8} } +func (x *ResLobbyView) GetCurTableNo() int32 { + if x != nil { + return x.CurTableNo + } + return 0 +} + func (x *ResLobbyView) GetTables() []*LobbyTable { if x != nil { return x.Tables @@ -1146,7 +1154,7 @@ type ResGameFullStatus struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - InGame bool `protobuf:"varint,1,opt,name=inGame,proto3" json:"inGame,omitempty"` // 游戏是否进行中 + // bool inGame = 1; // 游戏是否进行中 TableNo int32 `protobuf:"varint,2,opt,name=tableNo,proto3" json:"tableNo,omitempty"` // 所在桌面编号 GameStage int32 `protobuf:"varint,3,opt,name=gameStage,proto3" json:"gameStage,omitempty"` // 游戏阶段? Chip int32 `protobuf:"varint,4,opt,name=chip,proto3" json:"chip,omitempty"` // 牌桌筹码 @@ -1189,13 +1197,6 @@ func (*ResGameFullStatus) Descriptor() ([]byte, []int) { return file_poker_proto_rawDescGZIP(), []int{22} } -func (x *ResGameFullStatus) GetInGame() bool { - if x != nil { - return x.InGame - } - return false -} - func (x *ResGameFullStatus) GetTableNo() int32 { if x != nil { return x.TableNo @@ -1992,8 +1993,10 @@ var file_poker_proto_rawDesc = []byte{ 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 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, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x22, 0x0e, 0x0a, 0x0c, - 0x52, 0x65, 0x71, 0x4c, 0x6f, 0x62, 0x62, 0x79, 0x56, 0x69, 0x65, 0x77, 0x22, 0x37, 0x0a, 0x0c, - 0x52, 0x65, 0x73, 0x4c, 0x6f, 0x62, 0x62, 0x79, 0x56, 0x69, 0x65, 0x77, 0x12, 0x27, 0x0a, 0x06, + 0x52, 0x65, 0x71, 0x4c, 0x6f, 0x62, 0x62, 0x79, 0x56, 0x69, 0x65, 0x77, 0x22, 0x57, 0x0a, 0x0c, + 0x52, 0x65, 0x73, 0x4c, 0x6f, 0x62, 0x62, 0x79, 0x56, 0x69, 0x65, 0x77, 0x12, 0x1e, 0x0a, 0x0a, + 0x63, 0x75, 0x72, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x0a, 0x63, 0x75, 0x72, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x6f, 0x12, 0x27, 0x0a, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x6f, 0x62, 0x62, 0x79, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x22, 0x8c, 0x01, 0x0a, 0x0a, 0x4c, 0x6f, 0x62, 0x62, 0x79, 0x54, @@ -2038,97 +2041,96 @@ var file_poker_proto_rawDesc = []byte{ 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, 0xb2, 0x02, 0x0a, 0x11, 0x52, + 0x46, 0x75, 0x6c, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x9a, 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, 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, - 0x8f, 0x03, 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, 0x24, 0x0a, - 0x0d, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x42, 0x65, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x18, 0x0b, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x42, 0x65, 0x74, 0x54, 0x69, - 0x6d, 0x65, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x42, 0x65, 0x74, 0x43, - 0x68, 0x69, 0x70, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x74, 0x6f, 0x74, 0x61, 0x6c, - 0x42, 0x65, 0x74, 0x43, 0x68, 0x69, 0x70, 0x12, 0x29, 0x0a, 0x08, 0x68, 0x61, 0x6e, 0x64, 0x54, - 0x79, 0x70, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x48, 0x61, 0x6e, 0x64, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x68, 0x61, 0x6e, 0x64, 0x54, 0x79, - 0x70, 0x65, 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, - 0x53, 0x0a, 0x07, 0x42, 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x65, - 0x74, 0x4d, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x62, 0x65, 0x74, 0x4d, - 0x69, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x65, 0x74, 0x4d, 0x61, 0x78, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x06, 0x62, 0x65, 0x74, 0x4d, 0x61, 0x78, 0x12, 0x18, 0x0a, 0x07, 0x62, 0x65, - 0x74, 0x4f, 0x70, 0x74, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x05, 0x52, 0x07, 0x62, 0x65, 0x74, - 0x4f, 0x70, 0x74, 0x73, 0x22, 0x4c, 0x0a, 0x08, 0x48, 0x61, 0x6e, 0x64, 0x54, 0x79, 0x70, 0x65, - 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x68, 0x61, 0x6e, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x61, 0x6e, 0x64, 0x5a, 0x68, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x68, 0x61, 0x6e, 0x64, 0x5a, 0x68, 0x12, 0x14, 0x0a, 0x05, - 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x70, 0x6f, 0x69, - 0x6e, 0x74, 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, 0x40, 0x0a, 0x0a, 0x52, 0x65, 0x71, 0x42, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x18, - 0x0a, 0x07, 0x62, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x07, 0x62, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x62, 0x65, 0x74, 0x43, - 0x68, 0x69, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x62, 0x65, 0x74, 0x43, 0x68, - 0x69, 0x70, 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, 0x22, 0x3e, 0x0a, 0x10, 0x52, 0x65, 0x73, 0x47, 0x61, - 0x6d, 0x65, 0x45, 0x6e, 0x64, 0x53, 0x65, 0x74, 0x74, 0x6c, 0x65, 0x12, 0x2a, 0x0a, 0x04, 0x67, - 0x61, 0x6d, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x52, 0x65, 0x73, 0x47, 0x61, 0x6d, 0x65, 0x46, 0x75, 0x6c, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x52, 0x04, 0x67, 0x61, 0x6d, 0x65, 0x22, 0x92, 0x01, 0x0a, 0x11, 0x52, 0x65, 0x73, 0x43, - 0x61, 0x6c, 0x63, 0x57, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x43, 0x68, 0x69, 0x70, 0x12, 0x40, 0x0a, - 0x08, 0x77, 0x69, 0x6e, 0x73, 0x43, 0x68, 0x69, 0x70, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x43, 0x61, 0x6c, 0x63, 0x57, 0x69, 0x6e, - 0x6e, 0x65, 0x72, 0x43, 0x68, 0x69, 0x70, 0x2e, 0x57, 0x69, 0x6e, 0x73, 0x43, 0x68, 0x69, 0x70, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x77, 0x69, 0x6e, 0x73, 0x43, 0x68, 0x69, 0x70, 0x1a, - 0x3b, 0x0a, 0x0d, 0x57, 0x69, 0x6e, 0x73, 0x43, 0x68, 0x69, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x6b, - 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x28, 0x0a, 0x10, - 0x52, 0x65, 0x73, 0x47, 0x61, 0x6d, 0x65, 0x4e, 0x65, 0x78, 0x74, 0x52, 0x6f, 0x75, 0x6e, 0x64, - 0x12, 0x14, 0x0a, 0x05, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x05, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x42, 0x0b, 0x5a, 0x09, 0x2e, 0x2f, 0x61, 0x70, 0x69, 0x3b, - 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 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, 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, 0x8f, 0x03, 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, 0x24, 0x0a, 0x0d, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x42, 0x65, + 0x74, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x72, 0x6f, + 0x75, 0x6e, 0x64, 0x42, 0x65, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x74, + 0x6f, 0x74, 0x61, 0x6c, 0x42, 0x65, 0x74, 0x43, 0x68, 0x69, 0x70, 0x18, 0x0d, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x0c, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x42, 0x65, 0x74, 0x43, 0x68, 0x69, 0x70, 0x12, + 0x29, 0x0a, 0x08, 0x68, 0x61, 0x6e, 0x64, 0x54, 0x79, 0x70, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x0d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x48, 0x61, 0x6e, 0x64, 0x54, 0x79, 0x70, 0x65, + 0x52, 0x08, 0x68, 0x61, 0x6e, 0x64, 0x54, 0x79, 0x70, 0x65, 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, 0x53, 0x0a, 0x07, 0x42, 0x65, 0x74, 0x52, 0x6f, + 0x6c, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x65, 0x74, 0x4d, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x06, 0x62, 0x65, 0x74, 0x4d, 0x69, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x65, + 0x74, 0x4d, 0x61, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x62, 0x65, 0x74, 0x4d, + 0x61, 0x78, 0x12, 0x18, 0x0a, 0x07, 0x62, 0x65, 0x74, 0x4f, 0x70, 0x74, 0x73, 0x18, 0x0d, 0x20, + 0x03, 0x28, 0x05, 0x52, 0x07, 0x62, 0x65, 0x74, 0x4f, 0x70, 0x74, 0x73, 0x22, 0x4c, 0x0a, 0x08, + 0x48, 0x61, 0x6e, 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x6e, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x61, 0x6e, 0x64, 0x12, 0x16, 0x0a, 0x06, + 0x68, 0x61, 0x6e, 0x64, 0x5a, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x68, 0x61, + 0x6e, 0x64, 0x5a, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x05, 0x70, 0x6f, 0x69, 0x6e, 0x74, 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, 0x40, 0x0a, 0x0a, 0x52, 0x65, 0x71, 0x42, + 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x62, 0x65, 0x74, 0x54, 0x79, 0x70, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x62, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x18, 0x0a, 0x07, 0x62, 0x65, 0x74, 0x43, 0x68, 0x69, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x07, 0x62, 0x65, 0x74, 0x43, 0x68, 0x69, 0x70, 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, 0x22, + 0x3e, 0x0a, 0x10, 0x52, 0x65, 0x73, 0x47, 0x61, 0x6d, 0x65, 0x45, 0x6e, 0x64, 0x53, 0x65, 0x74, + 0x74, 0x6c, 0x65, 0x12, 0x2a, 0x0a, 0x04, 0x67, 0x61, 0x6d, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x47, 0x61, 0x6d, 0x65, 0x46, + 0x75, 0x6c, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x04, 0x67, 0x61, 0x6d, 0x65, 0x22, + 0x92, 0x01, 0x0a, 0x11, 0x52, 0x65, 0x73, 0x43, 0x61, 0x6c, 0x63, 0x57, 0x69, 0x6e, 0x6e, 0x65, + 0x72, 0x43, 0x68, 0x69, 0x70, 0x12, 0x40, 0x0a, 0x08, 0x77, 0x69, 0x6e, 0x73, 0x43, 0x68, 0x69, + 0x70, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, + 0x73, 0x43, 0x61, 0x6c, 0x63, 0x57, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x43, 0x68, 0x69, 0x70, 0x2e, + 0x57, 0x69, 0x6e, 0x73, 0x43, 0x68, 0x69, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x77, + 0x69, 0x6e, 0x73, 0x43, 0x68, 0x69, 0x70, 0x1a, 0x3b, 0x0a, 0x0d, 0x57, 0x69, 0x6e, 0x73, 0x43, + 0x68, 0x69, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x3a, 0x02, 0x38, 0x01, 0x22, 0x28, 0x0a, 0x10, 0x52, 0x65, 0x73, 0x47, 0x61, 0x6d, 0x65, 0x4e, + 0x65, 0x78, 0x74, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x6f, 0x75, 0x6e, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x42, 0x0b, + 0x5a, 0x09, 0x2e, 0x2f, 0x61, 0x70, 0x69, 0x3b, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( diff --git a/api/poker.proto b/api/poker.proto index 9657c60..6adb754 100644 --- a/api/poker.proto +++ b/api/poker.proto @@ -52,6 +52,7 @@ message ReqLobbyView { } message ResLobbyView { + int32 curTableNo = 1; repeated LobbyTable tables = 3; } diff --git a/api/proto.js b/api/proto.js index 8112feb..b281e3b 100644 --- a/api/proto.js +++ b/api/proto.js @@ -1833,6 +1833,7 @@ export const api = $root.api = (() => { * Properties of a ResLobbyView. * @memberof api * @interface IResLobbyView + * @property {number|null} [curTableNo] ResLobbyView curTableNo * @property {Array.|null} [tables] ResLobbyView tables */ @@ -1852,6 +1853,14 @@ export const api = $root.api = (() => { this[keys[i]] = properties[keys[i]]; } + /** + * ResLobbyView curTableNo. + * @member {number} curTableNo + * @memberof api.ResLobbyView + * @instance + */ + ResLobbyView.prototype.curTableNo = 0; + /** * ResLobbyView tables. * @member {Array.} tables @@ -1884,6 +1893,8 @@ export const api = $root.api = (() => { ResLobbyView.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.curTableNo != null && Object.hasOwnProperty.call(message, "curTableNo")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.curTableNo); if (message.tables != null && message.tables.length) for (let i = 0; i < message.tables.length; ++i) $root.api.LobbyTable.encode(message.tables[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); @@ -1921,6 +1932,10 @@ export const api = $root.api = (() => { while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { + case 1: { + message.curTableNo = reader.int32(); + break; + } case 3: { if (!(message.tables && message.tables.length)) message.tables = []; @@ -1962,6 +1977,9 @@ export const api = $root.api = (() => { ResLobbyView.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.curTableNo != null && message.hasOwnProperty("curTableNo")) + if (!$util.isInteger(message.curTableNo)) + return "curTableNo: integer expected"; if (message.tables != null && message.hasOwnProperty("tables")) { if (!Array.isArray(message.tables)) return "tables: array expected"; @@ -1986,6 +2004,8 @@ export const api = $root.api = (() => { if (object instanceof $root.api.ResLobbyView) return object; let message = new $root.api.ResLobbyView(); + if (object.curTableNo != null) + message.curTableNo = object.curTableNo | 0; if (object.tables) { if (!Array.isArray(object.tables)) throw TypeError(".api.ResLobbyView.tables: array expected"); @@ -2014,6 +2034,10 @@ export const api = $root.api = (() => { let object = {}; if (options.arrays || options.defaults) object.tables = []; + if (options.defaults) + object.curTableNo = 0; + if (message.curTableNo != null && message.hasOwnProperty("curTableNo")) + object.curTableNo = message.curTableNo; if (message.tables && message.tables.length) { object.tables = []; for (let j = 0; j < message.tables.length; ++j) @@ -4812,7 +4836,6 @@ export const api = $root.api = (() => { * Properties of a ResGameFullStatus. * @memberof api * @interface IResGameFullStatus - * @property {boolean|null} [inGame] ResGameFullStatus inGame * @property {number|null} [tableNo] ResGameFullStatus tableNo * @property {number|null} [gameStage] ResGameFullStatus gameStage * @property {number|null} [chip] ResGameFullStatus chip @@ -4840,14 +4863,6 @@ export const api = $root.api = (() => { this[keys[i]] = properties[keys[i]]; } - /** - * ResGameFullStatus inGame. - * @member {boolean} inGame - * @memberof api.ResGameFullStatus - * @instance - */ - ResGameFullStatus.prototype.inGame = false; - /** * ResGameFullStatus tableNo. * @member {number} tableNo @@ -4936,8 +4951,6 @@ export const api = $root.api = (() => { ResGameFullStatus.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.inGame != null && Object.hasOwnProperty.call(message, "inGame")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.inGame); if (message.tableNo != null && Object.hasOwnProperty.call(message, "tableNo")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.tableNo); if (message.gameStage != null && Object.hasOwnProperty.call(message, "gameStage")) @@ -4990,10 +5003,6 @@ export const api = $root.api = (() => { while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.inGame = reader.bool(); - break; - } case 2: { message.tableNo = reader.int32(); break; @@ -5065,9 +5074,6 @@ export const api = $root.api = (() => { ResGameFullStatus.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.inGame != null && message.hasOwnProperty("inGame")) - if (typeof message.inGame !== "boolean") - return "inGame: boolean expected"; if (message.tableNo != null && message.hasOwnProperty("tableNo")) if (!$util.isInteger(message.tableNo)) return "tableNo: integer expected"; @@ -5119,8 +5125,6 @@ export const api = $root.api = (() => { if (object instanceof $root.api.ResGameFullStatus) return object; let message = new $root.api.ResGameFullStatus(); - if (object.inGame != null) - message.inGame = Boolean(object.inGame); if (object.tableNo != null) message.tableNo = object.tableNo | 0; if (object.gameStage != null) @@ -5181,7 +5185,6 @@ export const api = $root.api = (() => { object.players = []; } if (options.defaults) { - object.inGame = false; object.tableNo = 0; object.gameStage = 0; object.chip = 0; @@ -5193,8 +5196,6 @@ export const api = $root.api = (() => { object.bigBlindPos = 0; object.smallBlindPos = 0; } - if (message.inGame != null && message.hasOwnProperty("inGame")) - object.inGame = message.inGame; if (message.tableNo != null && message.hasOwnProperty("tableNo")) object.tableNo = message.tableNo; if (message.gameStage != null && message.hasOwnProperty("gameStage")) diff --git a/internal/game/table.go b/internal/game/table.go index 3687f9e..427d064 100644 --- a/internal/game/table.go +++ b/internal/game/table.go @@ -54,8 +54,6 @@ func (t *Table) InitGameAndPlayerStatus() { t.Dealer.Init() } t.Stage = 1 - t.BigBlindPos = 0 - t.SmallBlindPos = 0 for _, p := range t.Players { if p != nil { @@ -277,7 +275,9 @@ func (t *Table) SetNextPlayerWithRoundStart() { } case t.BigBlindPos: nextP.BetMin -= t.BigBlindChip - nextP.BetOpts = append(nextP.BetOpts, 5) + if t.LastPosBetChip == t.BigBlindChip { // 下注额未超过大盲注可过牌 + nextP.BetOpts = append(nextP.BetOpts, 5) + } if t.TexasType != 3 { nextP.BetMax -= t.BigBlindChip } @@ -305,10 +305,14 @@ func (t *Table) SetNextPlayer(current int) { // 最大最小下注额 nextP.BetMin = t.LastPosBetChip - nextP.BetOpts = []int32{1, 4} + nextP.BetOpts = []int32{4} // 可过牌 if t.LastPosBetType == 5 { + nextP.BetMin = t.BigBlindChip nextP.BetOpts = append(nextP.BetOpts, 5) + } else { + // 非过牌时可跟注 + nextP.BetOpts = append(nextP.BetOpts, 1) } // 下一玩家需跟注 // 游戏类型处理最大下注额 @@ -343,7 +347,9 @@ func (t *Table) SetNextPlayer(current int) { } case t.BigBlindPos: nextP.BetMin -= t.BigBlindChip - nextP.BetOpts = append(nextP.BetOpts, 5) + if t.LastPosBetChip == t.BigBlindChip { // 下注额未超过大盲注可过牌 + nextP.BetOpts = append(nextP.BetOpts, 5) + } if t.TexasType != 3 { nextP.BetMax -= t.BigBlindChip } @@ -418,7 +424,7 @@ func (t *Table) cardFightAndSettle() error { winners = []*Player{p} } else { if p.Hand.point > winners[0].Hand.point { - winners[0] = p + winners = []*Player{p} } else if p.Hand.point == winners[0].Hand.point { // 手牌相同 winners = append(winners, p) diff --git a/internal/service/table.go b/internal/service/table.go index 1148a2c..f4bb85a 100644 --- a/internal/service/table.go +++ b/internal/service/table.go @@ -88,6 +88,9 @@ func HandleReqLobbyView(account *session.NetAccount, msg *api.ReqLobbyView) (pro return res, nil } tables := make([]*api.LobbyTable, len(store.LobbyTables)) + if account.Player != nil { + res.CurTableNo = account.Player.GameTable.TableNo + } res.Tables = tables // 遍历 store tables 转换为视图层结构体