Gogs 4 kuukautta sitten
vanhempi
commit
d39fc9bd6a

+ 5 - 0
bin/client_msg/common.proto

@@ -135,6 +135,11 @@ message  ReqPlayer {
   optional int32 SitPos = 3;
   bool IsDealer = 4;
 }
+
+message ReqPlayerList {
+  repeated ReqPlayer ReqPlayers = 1;
+}
+
 message ReqGameRound {
   repeated ReqRound Rounds = 1;
 }

+ 2 - 10
src/server/game/room/room.go

@@ -32,15 +32,7 @@ type Room struct {
 	// 每局游戏
 	GameRound *GameRound
 	// 牌堆
-	CardDeck []Card
-}
-
-// 定一个扑克牌,从1到52
-type Card struct {
-	// 花色
-	Color int
-	// 点数
-	Point int
+	CardDeck *[]msg.ReqCard
 }
 
 type Player struct {
@@ -49,7 +41,7 @@ type Player struct {
 	IsRobot  bool
 	UserData interface{}
 	//手牌
-	HandCards []Card
+	HandCards *[]msg.ReqCard
 	// 座位
 	SitPos int32
 	// 等待发牌

+ 3 - 3
src/server/game/teen/buildRoom.go

@@ -30,9 +30,9 @@ func convertToMsgPlayerList(players []*room.Player) []*msg.ReqPlayer {
 	return msgPlayers
 }
 
-func convertToMsgCardList(cards []room.Card) []*msg.ReqCard {
-	msgCards := make([]*msg.ReqCard, len(cards))
-	for i, card := range cards {
+func convertToMsgCardList(cards *[]msg.ReqCard) []*msg.ReqCard {
+	msgCards := make([]*msg.ReqCard, len(*cards))
+	for i, card := range *cards {
 		msgCards[i] = &msg.ReqCard{
 			Color: int32(card.Color),
 			Point: int32(card.Point),

+ 10 - 9
src/server/game/teen/event.go

@@ -30,15 +30,16 @@ func handleEvents() {
 				}
 			}
 			userData.Teen_Patti_Room.Players = append(userData.Teen_Patti_Room.Players, &room.Player{
-				Id:       m.UserId,
-				Agent:    event.Agent,
-				IsRobot:  false,
-				UserData: userData,
-				SitPos:   SelfSitPos,
-				IsPacked: false,
-				IsSeen:   false,
-				IsShow:   false,
-				IsDealer: false,
+				Id:        m.UserId,
+				Agent:     event.Agent,
+				IsRobot:   false,
+				UserData:  userData,
+				SitPos:    SelfSitPos,
+				IsPacked:  false,
+				IsSeen:    false,
+				IsShow:    false,
+				IsDealer:  false,
+				HandCards: &[]msg.ReqCard{},
 			})
 			userData.Teen_Patti_Room.GameRound = &room.GameRound{
 				Rounds: make([]msg.ReqRound, 0),

+ 4 - 1
src/server/game/teen/opt.go

@@ -13,10 +13,13 @@ import (
 // 看牌
 func seen(room *room.Room, sitPos int32) {
 	log.Debug("看牌的位置: %d", room.RoundSitPos)
+	player := room.GetPlayerBySitPos(sitPos)
+	player.IsSeen = true
+	seenCards := *room.GetPlayerBySitPos(sitPos).HandCards
 	SendRoundMsgToAll(room, &msg.ReqRound{
 		Round:       int32(room.Round),
 		RoundSitPos: int32(sitPos),
-		PlayerOpt:   &msg.PlayerOpt{OptType: msg.PlayerOptType_OPT_SEEN},
+		PlayerOpt:   &msg.PlayerOpt{OptType: msg.PlayerOptType_OPT_SEEN, SeenCards: convertToMsgCardList(&seenCards)},
 		UserId:      room.GetPlayerBySitPos(sitPos).GetUserId(),
 	})
 }

+ 16 - 9
src/server/game/teen/round.go

@@ -45,13 +45,13 @@ func startDealCard(r *room.Room) {
 }
 
 // 返回牌堆里3张牌,并从牌堆中移除
-func getThreeCards(room *room.Room) []room.Card {
+func getThreeCards(room *room.Room) *[]msg.ReqCard {
 	// 获取前三张牌
-	threeCards := room.CardDeck[:3]
+	threeCards := (*room.CardDeck)[:3]
 	// 移除这三张牌(保留剩余的牌)
-	room.CardDeck = room.CardDeck[3:]
+	*room.CardDeck = (*room.CardDeck)[3:]
 	// 返回这三张牌
-	return threeCards
+	return &threeCards
 }
 
 // 通知玩家发牌
@@ -101,11 +101,13 @@ func addPlayerOptTimeout(room *room.Room, player *room.Player, timeout time.Dura
 // 收到玩家操作
 func recvPlayerOptAction(room *room.Room, sitPos int32, optType msg.PlayerOptType) {
 	player := room.GetPlayerBySitPos(sitPos)
-	cancelOptTimeout(player, sitPos)
 	log.Debug("recvPlayerOptAction, optType:%v", optType)
 	if optType == msg.PlayerOptType_OPT_SEEN { // 看牌
 		seen(room, sitPos)
-	} else if optType == msg.PlayerOptType_OPT_PACKED { // 弃牌
+		return
+	}
+	cancelOptTimeout(player, sitPos)
+	if optType == msg.PlayerOptType_OPT_PACKED { // 弃牌
 		packed(room, sitPos)
 	} else if optType == msg.PlayerOptType_OPT_CHAAL { // 跟注
 		chaal(room, sitPos)
@@ -115,11 +117,16 @@ func recvPlayerOptAction(room *room.Room, sitPos int32, optType msg.PlayerOptTyp
 }
 
 // 发送消息给所有玩家
-func SendRoundMsgToAll(room *room.Room, msg *msg.ReqRound) {
+func SendRoundMsgToAll(room *room.Room, mg *msg.ReqRound) {
+	if mg.PlayerOpt.OptType == msg.PlayerOptType_OPT_SEEN {
+		if mg.RoundSitPos != SelfSitPos {
+			mg.PlayerOpt.SeenCards = nil
+		}
+	}
 	for _, player := range room.Players {
 		if player.Agent != nil {
-			player.Agent.WriteMsg(msg)
+			player.Agent.WriteMsg(mg)
 		}
 	}
-	room.AddPlayerOpt(msg)
+	room.AddPlayerOpt(mg)
 }

+ 22 - 17
src/server/game/teen/teen.go

@@ -67,15 +67,16 @@ func createRoom(userId string, roomId string, agent gate.Agent) {
 	sitPosList := randomSitPos(userData.Teen_Patti_Room, random)
 	for i := 0; i < random; i++ {
 		userData.Teen_Patti_Room.Players = append(userData.Teen_Patti_Room.Players, &room.Player{
-			Id:       fmt.Sprintf("%d", i),
-			Agent:    nil,
-			IsRobot:  true,
-			UserData: createRobotUserData(),
-			SitPos:   int32(sitPosList[i]),
-			IsPacked: false,
-			IsSeen:   false,
-			IsShow:   false,
-			IsDealer: false,
+			Id:        fmt.Sprintf("%d", i),
+			Agent:     nil,
+			IsRobot:   true,
+			UserData:  createRobotUserData(),
+			SitPos:    int32(sitPosList[i]),
+			HandCards: &[]msg.ReqCard{},
+			IsPacked:  false,
+			IsSeen:    false,
+			IsShow:    false,
+			IsDealer:  false,
 		})
 	}
 
@@ -147,19 +148,23 @@ func startGame(userId string, roomId string, agent gate.Agent, teenPattiRoom *ro
 */
 // 初始化房间的卡牌
 func initCardDeck(c_room *room.Room) {
-	// 按照花色和点数初始化卡牌, 52张, 4种花色, 13种点数
-	c_room.CardDeck = make([]room.Card, 52)
+	// 创建长度为52的切片
+	cards := make([]msg.ReqCard, 52)
+
+	// 初始化卡牌
 	for i := 0; i < 52; i++ {
-		c_room.CardDeck[i] = room.Card{
-			Color: i / 13,
-			Point: i%13 + 1,
+		cards[i] = msg.ReqCard{
+			Color: int32(i / 13),
+			Point: int32(i%13 + 1),
 		}
 	}
+	// 赋值给房间
+	c_room.CardDeck = &cards
 }
 
 // 洗牌
-func shuffleCardDeck(deck []room.Card) {
-	rand.Shuffle(len(deck), func(i, j int) {
-		deck[i], deck[j] = deck[j], deck[i]
+func shuffleCardDeck(deck *[]msg.ReqCard) {
+	rand.Shuffle(len(*deck), func(i, j int) {
+		(*deck)[i], (*deck)[j] = (*deck)[j], (*deck)[i]
 	})
 }

+ 122 - 58
src/server/msg/common.pb.go

@@ -1282,6 +1282,53 @@ func (x *ReqPlayer) GetIsDealer() bool {
 	return false
 }
 
+type ReqPlayerList struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	ReqPlayers []*ReqPlayer `protobuf:"bytes,1,rep,name=ReqPlayers,proto3" json:"ReqPlayers,omitempty"`
+}
+
+func (x *ReqPlayerList) Reset() {
+	*x = ReqPlayerList{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_common_proto_msgTypes[19]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *ReqPlayerList) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ReqPlayerList) ProtoMessage() {}
+
+func (x *ReqPlayerList) ProtoReflect() protoreflect.Message {
+	mi := &file_common_proto_msgTypes[19]
+	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 ReqPlayerList.ProtoReflect.Descriptor instead.
+func (*ReqPlayerList) Descriptor() ([]byte, []int) {
+	return file_common_proto_rawDescGZIP(), []int{19}
+}
+
+func (x *ReqPlayerList) GetReqPlayers() []*ReqPlayer {
+	if x != nil {
+		return x.ReqPlayers
+	}
+	return nil
+}
+
 type ReqGameRound struct {
 	state         protoimpl.MessageState
 	sizeCache     protoimpl.SizeCache
@@ -1293,7 +1340,7 @@ type ReqGameRound struct {
 func (x *ReqGameRound) Reset() {
 	*x = ReqGameRound{}
 	if protoimpl.UnsafeEnabled {
-		mi := &file_common_proto_msgTypes[19]
+		mi := &file_common_proto_msgTypes[20]
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		ms.StoreMessageInfo(mi)
 	}
@@ -1306,7 +1353,7 @@ func (x *ReqGameRound) String() string {
 func (*ReqGameRound) ProtoMessage() {}
 
 func (x *ReqGameRound) ProtoReflect() protoreflect.Message {
-	mi := &file_common_proto_msgTypes[19]
+	mi := &file_common_proto_msgTypes[20]
 	if protoimpl.UnsafeEnabled && x != nil {
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		if ms.LoadMessageInfo() == nil {
@@ -1319,7 +1366,7 @@ func (x *ReqGameRound) ProtoReflect() protoreflect.Message {
 
 // Deprecated: Use ReqGameRound.ProtoReflect.Descriptor instead.
 func (*ReqGameRound) Descriptor() ([]byte, []int) {
-	return file_common_proto_rawDescGZIP(), []int{19}
+	return file_common_proto_rawDescGZIP(), []int{20}
 }
 
 func (x *ReqGameRound) GetRounds() []*ReqRound {
@@ -1347,7 +1394,7 @@ type ReqRound struct {
 func (x *ReqRound) Reset() {
 	*x = ReqRound{}
 	if protoimpl.UnsafeEnabled {
-		mi := &file_common_proto_msgTypes[20]
+		mi := &file_common_proto_msgTypes[21]
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		ms.StoreMessageInfo(mi)
 	}
@@ -1360,7 +1407,7 @@ func (x *ReqRound) String() string {
 func (*ReqRound) ProtoMessage() {}
 
 func (x *ReqRound) ProtoReflect() protoreflect.Message {
-	mi := &file_common_proto_msgTypes[20]
+	mi := &file_common_proto_msgTypes[21]
 	if protoimpl.UnsafeEnabled && x != nil {
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		if ms.LoadMessageInfo() == nil {
@@ -1373,7 +1420,7 @@ func (x *ReqRound) ProtoReflect() protoreflect.Message {
 
 // Deprecated: Use ReqRound.ProtoReflect.Descriptor instead.
 func (*ReqRound) Descriptor() ([]byte, []int) {
-	return file_common_proto_rawDescGZIP(), []int{20}
+	return file_common_proto_rawDescGZIP(), []int{21}
 }
 
 func (x *ReqRound) GetRound() int32 {
@@ -1417,7 +1464,7 @@ type MsgError struct {
 func (x *MsgError) Reset() {
 	*x = MsgError{}
 	if protoimpl.UnsafeEnabled {
-		mi := &file_common_proto_msgTypes[21]
+		mi := &file_common_proto_msgTypes[22]
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		ms.StoreMessageInfo(mi)
 	}
@@ -1430,7 +1477,7 @@ func (x *MsgError) String() string {
 func (*MsgError) ProtoMessage() {}
 
 func (x *MsgError) ProtoReflect() protoreflect.Message {
-	mi := &file_common_proto_msgTypes[21]
+	mi := &file_common_proto_msgTypes[22]
 	if protoimpl.UnsafeEnabled && x != nil {
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		if ms.LoadMessageInfo() == nil {
@@ -1443,7 +1490,7 @@ func (x *MsgError) ProtoReflect() protoreflect.Message {
 
 // Deprecated: Use MsgError.ProtoReflect.Descriptor instead.
 func (*MsgError) Descriptor() ([]byte, []int) {
-	return file_common_proto_rawDescGZIP(), []int{21}
+	return file_common_proto_rawDescGZIP(), []int{22}
 }
 
 func (x *MsgError) GetErrorCode() int32 {
@@ -1471,7 +1518,7 @@ type Hello struct {
 func (x *Hello) Reset() {
 	*x = Hello{}
 	if protoimpl.UnsafeEnabled {
-		mi := &file_common_proto_msgTypes[22]
+		mi := &file_common_proto_msgTypes[23]
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		ms.StoreMessageInfo(mi)
 	}
@@ -1484,7 +1531,7 @@ func (x *Hello) String() string {
 func (*Hello) ProtoMessage() {}
 
 func (x *Hello) ProtoReflect() protoreflect.Message {
-	mi := &file_common_proto_msgTypes[22]
+	mi := &file_common_proto_msgTypes[23]
 	if protoimpl.UnsafeEnabled && x != nil {
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		if ms.LoadMessageInfo() == nil {
@@ -1497,7 +1544,7 @@ func (x *Hello) ProtoReflect() protoreflect.Message {
 
 // Deprecated: Use Hello.ProtoReflect.Descriptor instead.
 func (*Hello) Descriptor() ([]byte, []int) {
-	return file_common_proto_rawDescGZIP(), []int{22}
+	return file_common_proto_rawDescGZIP(), []int{23}
 }
 
 func (x *Hello) GetName() string {
@@ -1630,34 +1677,37 @@ var file_common_proto_rawDesc = []byte{
 	0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x48, 0x00, 0x52, 0x06, 0x53, 0x69, 0x74, 0x50, 0x6f,
 	0x73, 0x88, 0x01, 0x01, 0x12, 0x1a, 0x0a, 0x08, 0x49, 0x73, 0x44, 0x65, 0x61, 0x6c, 0x65, 0x72,
 	0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x49, 0x73, 0x44, 0x65, 0x61, 0x6c, 0x65, 0x72,
-	0x42, 0x09, 0x0a, 0x07, 0x5f, 0x53, 0x69, 0x74, 0x50, 0x6f, 0x73, 0x22, 0x31, 0x0a, 0x0c, 0x52,
-	0x65, 0x71, 0x47, 0x61, 0x6d, 0x65, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x21, 0x0a, 0x06, 0x52,
-	0x6f, 0x75, 0x6e, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x52, 0x65,
-	0x71, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x06, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x73, 0x22, 0x84,
-	0x01, 0x0a, 0x08, 0x52, 0x65, 0x71, 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, 0x12, 0x20, 0x0a, 0x0b, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x53, 0x69, 0x74, 0x50, 0x6f, 0x73,
-	0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x53, 0x69, 0x74,
-	0x50, 0x6f, 0x73, 0x12, 0x28, 0x0a, 0x09, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4f, 0x70, 0x74,
-	0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4f,
-	0x70, 0x74, 0x52, 0x09, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4f, 0x70, 0x74, 0x12, 0x16, 0x0a,
-	0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75,
-	0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0x46, 0x0a, 0x08, 0x4d, 0x73, 0x67, 0x45, 0x72, 0x72, 0x6f,
-	0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18,
-	0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65,
-	0x12, 0x1b, 0x0a, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20,
-	0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x73, 0x67, 0x22, 0x1b, 0x0a,
-	0x05, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01,
-	0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x2a, 0x76, 0x0a, 0x0d, 0x50, 0x6c,
-	0x61, 0x79, 0x65, 0x72, 0x4f, 0x70, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0c, 0x0a, 0x08, 0x4f,
-	0x50, 0x54, 0x5f, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x4f, 0x50, 0x54,
-	0x5f, 0x53, 0x45, 0x45, 0x4e, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x4f, 0x50, 0x54, 0x5f, 0x50,
-	0x41, 0x43, 0x4b, 0x45, 0x44, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x4f, 0x50, 0x54, 0x5f, 0x43,
-	0x48, 0x41, 0x41, 0x4c, 0x10, 0x03, 0x12, 0x0c, 0x0a, 0x08, 0x4f, 0x50, 0x54, 0x5f, 0x42, 0x49,
-	0x4e, 0x44, 0x10, 0x04, 0x12, 0x0e, 0x0a, 0x0a, 0x4f, 0x50, 0x54, 0x5f, 0x53, 0x45, 0x4c, 0x45,
-	0x43, 0x54, 0x10, 0x05, 0x12, 0x0c, 0x0a, 0x08, 0x4f, 0x50, 0x54, 0x5f, 0x53, 0x48, 0x4f, 0x57,
-	0x10, 0x06, 0x42, 0x07, 0x5a, 0x05, 0x2e, 0x2f, 0x6d, 0x73, 0x67, 0x62, 0x06, 0x70, 0x72, 0x6f,
-	0x74, 0x6f, 0x33,
+	0x42, 0x09, 0x0a, 0x07, 0x5f, 0x53, 0x69, 0x74, 0x50, 0x6f, 0x73, 0x22, 0x3b, 0x0a, 0x0d, 0x52,
+	0x65, 0x71, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x2a, 0x0a, 0x0a,
+	0x52, 0x65, 0x71, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b,
+	0x32, 0x0a, 0x2e, 0x52, 0x65, 0x71, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x52, 0x0a, 0x52, 0x65,
+	0x71, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x22, 0x31, 0x0a, 0x0c, 0x52, 0x65, 0x71, 0x47,
+	0x61, 0x6d, 0x65, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x21, 0x0a, 0x06, 0x52, 0x6f, 0x75, 0x6e,
+	0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x52, 0x65, 0x71, 0x52, 0x6f,
+	0x75, 0x6e, 0x64, 0x52, 0x06, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x73, 0x22, 0x84, 0x01, 0x0a, 0x08,
+	0x52, 0x65, 0x71, 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, 0x12, 0x20,
+	0x0a, 0x0b, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x53, 0x69, 0x74, 0x50, 0x6f, 0x73, 0x18, 0x02, 0x20,
+	0x01, 0x28, 0x05, 0x52, 0x0b, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x53, 0x69, 0x74, 0x50, 0x6f, 0x73,
+	0x12, 0x28, 0x0a, 0x09, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4f, 0x70, 0x74, 0x18, 0x03, 0x20,
+	0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4f, 0x70, 0x74, 0x52,
+	0x09, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4f, 0x70, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73,
+	0x65, 0x72, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72,
+	0x49, 0x64, 0x22, 0x46, 0x0a, 0x08, 0x4d, 0x73, 0x67, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x1d,
+	0x0a, 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01,
+	0x28, 0x05, 0x52, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1b, 0x0a,
+	0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
+	0x52, 0x08, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x73, 0x67, 0x22, 0x1b, 0x0a, 0x05, 0x48, 0x65,
+	0x6c, 0x6c, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
+	0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x2a, 0x76, 0x0a, 0x0d, 0x50, 0x6c, 0x61, 0x79, 0x65,
+	0x72, 0x4f, 0x70, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0c, 0x0a, 0x08, 0x4f, 0x50, 0x54, 0x5f,
+	0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x4f, 0x50, 0x54, 0x5f, 0x53, 0x45,
+	0x45, 0x4e, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x4f, 0x50, 0x54, 0x5f, 0x50, 0x41, 0x43, 0x4b,
+	0x45, 0x44, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x4f, 0x50, 0x54, 0x5f, 0x43, 0x48, 0x41, 0x41,
+	0x4c, 0x10, 0x03, 0x12, 0x0c, 0x0a, 0x08, 0x4f, 0x50, 0x54, 0x5f, 0x42, 0x49, 0x4e, 0x44, 0x10,
+	0x04, 0x12, 0x0e, 0x0a, 0x0a, 0x4f, 0x50, 0x54, 0x5f, 0x53, 0x45, 0x4c, 0x45, 0x43, 0x54, 0x10,
+	0x05, 0x12, 0x0c, 0x0a, 0x08, 0x4f, 0x50, 0x54, 0x5f, 0x53, 0x48, 0x4f, 0x57, 0x10, 0x06, 0x42,
+	0x07, 0x5a, 0x05, 0x2e, 0x2f, 0x6d, 0x73, 0x67, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
 }
 
 var (
@@ -1673,7 +1723,7 @@ func file_common_proto_rawDescGZIP() []byte {
 }
 
 var file_common_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
-var file_common_proto_msgTypes = make([]protoimpl.MessageInfo, 23)
+var file_common_proto_msgTypes = make([]protoimpl.MessageInfo, 24)
 var file_common_proto_goTypes = []interface{}{
 	(PlayerOptType)(0),         // 0: PlayerOptType
 	(*ResLogin)(nil),           // 1: ResLogin
@@ -1695,13 +1745,14 @@ var file_common_proto_goTypes = []interface{}{
 	(*ReqRoom)(nil),            // 17: ReqRoom
 	(*ReqCard)(nil),            // 18: ReqCard
 	(*ReqPlayer)(nil),          // 19: ReqPlayer
-	(*ReqGameRound)(nil),       // 20: ReqGameRound
-	(*ReqRound)(nil),           // 21: ReqRound
-	(*MsgError)(nil),           // 22: MsgError
-	(*Hello)(nil),              // 23: Hello
+	(*ReqPlayerList)(nil),      // 20: ReqPlayerList
+	(*ReqGameRound)(nil),       // 21: ReqGameRound
+	(*ReqRound)(nil),           // 22: ReqRound
+	(*MsgError)(nil),           // 23: MsgError
+	(*Hello)(nil),              // 24: Hello
 }
 var file_common_proto_depIdxs = []int32{
-	22, // 0: ReqLogin.error:type_name -> MsgError
+	23, // 0: ReqLogin.error:type_name -> MsgError
 	17, // 1: ReqJoinRoom.roomInfo:type_name -> ReqRoom
 	11, // 2: ReqGameInfo.teenPattiRoomList:type_name -> TeenPattiRoomList
 	12, // 3: TeenPattiRoomList.teenPattiRoom:type_name -> TeenPattiRoom
@@ -1710,15 +1761,16 @@ var file_common_proto_depIdxs = []int32{
 	0,  // 6: PlayerOpt.opt_type:type_name -> PlayerOptType
 	18, // 7: PlayerOpt.seenCards:type_name -> ReqCard
 	19, // 8: ReqRoom.ReqPlayers:type_name -> ReqPlayer
-	20, // 9: ReqRoom.GameRound:type_name -> ReqGameRound
+	21, // 9: ReqRoom.GameRound:type_name -> ReqGameRound
 	18, // 10: ReqPlayer.HandCards:type_name -> ReqCard
-	21, // 11: ReqGameRound.Rounds:type_name -> ReqRound
-	16, // 12: ReqRound.playerOpt:type_name -> PlayerOpt
-	13, // [13:13] is the sub-list for method output_type
-	13, // [13:13] is the sub-list for method input_type
-	13, // [13:13] is the sub-list for extension type_name
-	13, // [13:13] is the sub-list for extension extendee
-	0,  // [0:13] is the sub-list for field type_name
+	19, // 11: ReqPlayerList.ReqPlayers:type_name -> ReqPlayer
+	22, // 12: ReqGameRound.Rounds:type_name -> ReqRound
+	16, // 13: ReqRound.playerOpt:type_name -> PlayerOpt
+	14, // [14:14] is the sub-list for method output_type
+	14, // [14:14] is the sub-list for method input_type
+	14, // [14:14] is the sub-list for extension type_name
+	14, // [14:14] is the sub-list for extension extendee
+	0,  // [0:14] is the sub-list for field type_name
 }
 
 func init() { file_common_proto_init() }
@@ -1956,7 +2008,7 @@ func file_common_proto_init() {
 			}
 		}
 		file_common_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} {
-			switch v := v.(*ReqGameRound); i {
+			switch v := v.(*ReqPlayerList); i {
 			case 0:
 				return &v.state
 			case 1:
@@ -1968,7 +2020,7 @@ func file_common_proto_init() {
 			}
 		}
 		file_common_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} {
-			switch v := v.(*ReqRound); i {
+			switch v := v.(*ReqGameRound); i {
 			case 0:
 				return &v.state
 			case 1:
@@ -1980,7 +2032,7 @@ func file_common_proto_init() {
 			}
 		}
 		file_common_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} {
-			switch v := v.(*MsgError); i {
+			switch v := v.(*ReqRound); i {
 			case 0:
 				return &v.state
 			case 1:
@@ -1992,6 +2044,18 @@ func file_common_proto_init() {
 			}
 		}
 		file_common_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*MsgError); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_common_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} {
 			switch v := v.(*Hello); i {
 			case 0:
 				return &v.state
@@ -2011,7 +2075,7 @@ func file_common_proto_init() {
 			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
 			RawDescriptor: file_common_proto_rawDesc,
 			NumEnums:      1,
-			NumMessages:   23,
+			NumMessages:   24,
 			NumExtensions: 0,
 			NumServices:   0,
 		},