Gogs пре 4 месеци
родитељ
комит
65fa33df41

+ 4 - 0
bin/client_msg/common.proto

@@ -147,6 +147,10 @@ message ReqPlayerList {
 message ReqGameRound {
   repeated ReqRound Rounds = 1;
 }
+
+message ReqBet {
+  int32 betAmount = 1;
+}
 message ReqRound {
     // 回合数
     int32 round = 1;

+ 7 - 0
src/server/game/room/room.go

@@ -10,6 +10,8 @@ import (
 
 // 定一个类为每局游戏
 type GameRound struct {
+	// 押注总数
+	TotalBet int32
 	//回合列表
 	Rounds []msg.ReqRound
 }
@@ -224,3 +226,8 @@ func (r *Room) PlayerWin(sitPos int32) {
 	player := r.GetPlayerBySitPos(sitPos)
 	player.IsWin = true
 }
+
+// 增加押注
+func (r *Room) AddBet(bet int32) {
+	r.GameRound.TotalBet += bet
+}

+ 1 - 1
src/server/game/teen/event.go

@@ -51,7 +51,7 @@ func handleEvents() {
 			m := event.Data.(*msg.ResPlayerOptAction)
 			userData := event.Agent.UserData().(*user.UserData)
 			if userData.Teen_Patti_Room != nil {
-				recvPlayerOptAction(userData.Teen_Patti_Room, m.SitPos, m.PlayerOpt.OptType)
+				recvPlayerOptAction(userData.Teen_Patti_Room, m.SitPos, m.PlayerOpt)
 			} else {
 				log.Error("userData.Teen_Patti_Room is nil")
 			}

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

@@ -44,8 +44,9 @@ func packed(room *room.Room, sitPos int32) {
 }
 
 // 跟注
-func chaal(room *room.Room, sitPos int32) {
+func chaal(room *room.Room, sitPos int32, betAmount int32) {
 	room.SetNextRound()
+	room.AddBet(betAmount)
 	SendRoundMsgToAll(room, &msg.ReqRound{
 		Round:       int32(room.Round),
 		RoundSitPos: int32(sitPos),

+ 4 - 3
src/server/game/teen/robot.go

@@ -80,9 +80,10 @@ func robotPack(r *room.Room, sitPos int32) {
 
 func robotChaal(r *room.Room, sitPos int32) {
 	//获取1-5的随机数
-	chaalAmount := rand.Intn(5) + 1
-	game.Module.Skeleton.AfterFunc(time.Second*time.Duration(chaalAmount), func() {
-		recvPlayerOptAction(r, sitPos, msg.PlayerOptType_OPT_CHAAL)
+	randTime := rand.Intn(5) + 1
+	chaalAmount := 200
+	game.Module.Skeleton.AfterFunc(time.Second*time.Duration(randTime), func() {
+		recvPlayerOptAction(r, sitPos, &msg.PlayerOpt{OptType: msg.PlayerOptType_OPT_CHAAL, BetAmount: int32(chaalAmount)})
 	})
 }
 

+ 23 - 14
src/server/game/teen/round.go

@@ -24,19 +24,16 @@ func startDealCard(r *room.Room) {
 
 		players := r.GetPlayersBySitPos(dealer.SitPos)
 
+		//每个玩家从第一张开始发,发完再给每个玩家发第二张牌,发完再给每个玩家发第三张牌,要有序有间隔的体现
 		for index := 0; index < 3; index++ {
-			// 找到庄家下家依次发牌
-			for _, player := range players {
+			for i, player := range players {
 				player.HandCards = getThreeCards(r)
 				player.WaitCard = false
-				go notifyPlayerDealCard(r, player.SitPos, int32(index))
-				// game.Module.Skeleton.AfterFunc(time.Second*1*time.Duration(i), func() {
-				// 	// 如果等待的人数小于等于0,则开始通知庄家操作
-				// 	// if len(r.GetWaitCardPlayers()) <= 0 {
-
-				// 	// }
-
-				// })
+				// 计算延时:轮次*总延时 + 玩家索引*单次延时
+				delay := time.Duration(index*len(players)+i) * 300 * time.Millisecond
+				game.Module.Skeleton.AfterFunc(delay, func() {
+					notifyPlayerDealCard(r, player.SitPos, int32(index))
+				})
 			}
 		}
 
@@ -60,11 +57,10 @@ func getThreeCards(room *room.Room) *[]msg.ReqCard {
 
 // 通知玩家发牌
 func notifyPlayerDealCard(room *room.Room, sitPos int32, index int32) {
-	time.Sleep(time.Second * 1)
 	//遍历所有玩家
 	for _, player := range room.Players {
 		if player.Agent != nil {
-			player.Agent.WriteMsg(&msg.ReqDealCard{SitPos: int32(sitPos), Index: index})
+			player.Agent.WriteMsg(&msg.ReqDealCard{SitPos: &sitPos, Index: &index})
 		}
 	}
 }
@@ -104,8 +100,9 @@ func addPlayerOptTimeout(room *room.Room, player *room.Player, timeout time.Dura
 }
 
 // 收到玩家操作
-func recvPlayerOptAction(room *room.Room, sitPos int32, optType msg.PlayerOptType) {
+func recvPlayerOptAction(room *room.Room, sitPos int32, opt *msg.PlayerOpt) {
 	player := room.GetPlayerBySitPos(sitPos)
+	optType := opt.OptType
 	log.Debug("recvPlayerOptAction, optType:%v", optType)
 	player.LastOpt = &msg.PlayerOpt{OptType: optType}
 	if optType == msg.PlayerOptType_OPT_SEEN { // 看牌
@@ -115,7 +112,10 @@ func recvPlayerOptAction(room *room.Room, sitPos int32, optType msg.PlayerOptTyp
 		if optType == msg.PlayerOptType_OPT_PACKED { // 弃牌
 			packed(room, sitPos)
 		} else if optType == msg.PlayerOptType_OPT_CHAAL { // 跟注
-			chaal(room, sitPos)
+			chaal(room, sitPos, opt.BetAmount)
+			game.Module.Skeleton.AfterFunc(time.Second*1, func() {
+				sendRoomBet(room)
+			})
 		} else if optType == msg.PlayerOptType_OPT_SHOW { // 亮牌
 			show(room, sitPos)
 		}
@@ -146,3 +146,12 @@ func updateAllPlayerInfo(room *room.Room) {
 		}
 	}
 }
+
+// 发送房间押注
+func sendRoomBet(room *room.Room) {
+	for _, player := range room.Players {
+		if player.Agent != nil {
+			player.Agent.WriteMsg(&msg.ReqBet{BetAmount: room.GameRound.TotalBet})
+		}
+	}
+}

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

@@ -105,7 +105,7 @@ func startGame(userId string, roomId string, agent gate.Agent, teenPattiRoom *ro
 		SitPos:   SelfSitPos,
 	})
 	game.Module.Skeleton.AfterFunc(time.Second*2, func() {
-		startDealCard(teenPattiRoom)
+		go startDealCard(teenPattiRoom)
 	})
 }
 

+ 104 - 42
src/server/msg/common.pb.go

@@ -1408,6 +1408,53 @@ func (x *ReqGameRound) GetRounds() []*ReqRound {
 	return nil
 }
 
+type ReqBet struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	BetAmount int32 `protobuf:"varint,1,opt,name=betAmount,proto3" json:"betAmount,omitempty"`
+}
+
+func (x *ReqBet) Reset() {
+	*x = ReqBet{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_common_proto_msgTypes[21]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *ReqBet) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ReqBet) ProtoMessage() {}
+
+func (x *ReqBet) ProtoReflect() protoreflect.Message {
+	mi := &file_common_proto_msgTypes[21]
+	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 ReqBet.ProtoReflect.Descriptor instead.
+func (*ReqBet) Descriptor() ([]byte, []int) {
+	return file_common_proto_rawDescGZIP(), []int{21}
+}
+
+func (x *ReqBet) GetBetAmount() int32 {
+	if x != nil {
+		return x.BetAmount
+	}
+	return 0
+}
+
 type ReqRound struct {
 	state         protoimpl.MessageState
 	sizeCache     protoimpl.SizeCache
@@ -1426,7 +1473,7 @@ type ReqRound struct {
 func (x *ReqRound) Reset() {
 	*x = ReqRound{}
 	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)
 	}
@@ -1439,7 +1486,7 @@ func (x *ReqRound) String() string {
 func (*ReqRound) ProtoMessage() {}
 
 func (x *ReqRound) 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 {
@@ -1452,7 +1499,7 @@ func (x *ReqRound) ProtoReflect() protoreflect.Message {
 
 // Deprecated: Use ReqRound.ProtoReflect.Descriptor instead.
 func (*ReqRound) Descriptor() ([]byte, []int) {
-	return file_common_proto_rawDescGZIP(), []int{21}
+	return file_common_proto_rawDescGZIP(), []int{22}
 }
 
 func (x *ReqRound) GetRound() int32 {
@@ -1496,7 +1543,7 @@ type MsgError struct {
 func (x *MsgError) Reset() {
 	*x = MsgError{}
 	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)
 	}
@@ -1509,7 +1556,7 @@ func (x *MsgError) String() string {
 func (*MsgError) ProtoMessage() {}
 
 func (x *MsgError) 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 {
@@ -1522,7 +1569,7 @@ func (x *MsgError) ProtoReflect() protoreflect.Message {
 
 // Deprecated: Use MsgError.ProtoReflect.Descriptor instead.
 func (*MsgError) Descriptor() ([]byte, []int) {
-	return file_common_proto_rawDescGZIP(), []int{22}
+	return file_common_proto_rawDescGZIP(), []int{23}
 }
 
 func (x *MsgError) GetErrorCode() int32 {
@@ -1550,7 +1597,7 @@ type Hello struct {
 func (x *Hello) Reset() {
 	*x = Hello{}
 	if protoimpl.UnsafeEnabled {
-		mi := &file_common_proto_msgTypes[23]
+		mi := &file_common_proto_msgTypes[24]
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		ms.StoreMessageInfo(mi)
 	}
@@ -1563,7 +1610,7 @@ func (x *Hello) String() string {
 func (*Hello) ProtoMessage() {}
 
 func (x *Hello) ProtoReflect() protoreflect.Message {
-	mi := &file_common_proto_msgTypes[23]
+	mi := &file_common_proto_msgTypes[24]
 	if protoimpl.UnsafeEnabled && x != nil {
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		if ms.LoadMessageInfo() == nil {
@@ -1576,7 +1623,7 @@ func (x *Hello) ProtoReflect() protoreflect.Message {
 
 // Deprecated: Use Hello.ProtoReflect.Descriptor instead.
 func (*Hello) Descriptor() ([]byte, []int) {
-	return file_common_proto_rawDescGZIP(), []int{23}
+	return file_common_proto_rawDescGZIP(), []int{24}
 }
 
 func (x *Hello) GetName() string {
@@ -1729,30 +1776,32 @@ var file_common_proto_rawDesc = []byte{
 	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,
+	0x22, 0x26, 0x0a, 0x06, 0x52, 0x65, 0x71, 0x42, 0x65, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x62, 0x65,
+	0x74, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x62,
+	0x65, 0x74, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 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 (
@@ -1768,7 +1817,7 @@ func file_common_proto_rawDescGZIP() []byte {
 }
 
 var file_common_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
-var file_common_proto_msgTypes = make([]protoimpl.MessageInfo, 24)
+var file_common_proto_msgTypes = make([]protoimpl.MessageInfo, 25)
 var file_common_proto_goTypes = []interface{}{
 	(PlayerOptType)(0),         // 0: PlayerOptType
 	(*ResLogin)(nil),           // 1: ResLogin
@@ -1792,12 +1841,13 @@ var file_common_proto_goTypes = []interface{}{
 	(*ReqPlayer)(nil),          // 19: ReqPlayer
 	(*ReqPlayerList)(nil),      // 20: ReqPlayerList
 	(*ReqGameRound)(nil),       // 21: ReqGameRound
-	(*ReqRound)(nil),           // 22: ReqRound
-	(*MsgError)(nil),           // 23: MsgError
-	(*Hello)(nil),              // 24: Hello
+	(*ReqBet)(nil),             // 22: ReqBet
+	(*ReqRound)(nil),           // 23: ReqRound
+	(*MsgError)(nil),           // 24: MsgError
+	(*Hello)(nil),              // 25: Hello
 }
 var file_common_proto_depIdxs = []int32{
-	23, // 0: ReqLogin.error:type_name -> MsgError
+	24, // 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
@@ -1809,7 +1859,7 @@ var file_common_proto_depIdxs = []int32{
 	21, // 9: ReqRoom.GameRound:type_name -> ReqGameRound
 	18, // 10: ReqPlayer.HandCards:type_name -> ReqCard
 	19, // 11: ReqPlayerList.ReqPlayers:type_name -> ReqPlayer
-	22, // 12: ReqGameRound.Rounds:type_name -> ReqRound
+	23, // 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
@@ -2077,7 +2127,7 @@ func file_common_proto_init() {
 			}
 		}
 		file_common_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} {
-			switch v := v.(*ReqRound); i {
+			switch v := v.(*ReqBet); i {
 			case 0:
 				return &v.state
 			case 1:
@@ -2089,7 +2139,7 @@ func file_common_proto_init() {
 			}
 		}
 		file_common_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} {
-			switch v := v.(*MsgError); i {
+			switch v := v.(*ReqRound); i {
 			case 0:
 				return &v.state
 			case 1:
@@ -2101,6 +2151,18 @@ func file_common_proto_init() {
 			}
 		}
 		file_common_proto_msgTypes[23].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[24].Exporter = func(v interface{}, i int) interface{} {
 			switch v := v.(*Hello); i {
 			case 0:
 				return &v.state
@@ -2121,7 +2183,7 @@ func file_common_proto_init() {
 			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
 			RawDescriptor: file_common_proto_rawDesc,
 			NumEnums:      1,
-			NumMessages:   24,
+			NumMessages:   25,
 			NumExtensions: 0,
 			NumServices:   0,
 		},