|
|
|
@ -123,20 +123,20 @@ func Fold4Limited(player *Player, betChip int32) proto.Message { |
|
|
|
|
|
|
|
|
|
|
|
player.SetStatus(7) |
|
|
|
player.SetStatus(7) |
|
|
|
betNotice.Line2 = "弃牌" |
|
|
|
betNotice.Line2 = "弃牌" |
|
|
|
// 剩余玩家数为1则结束
|
|
|
|
// 剩余玩家数为1则结束, 在 service 中判断
|
|
|
|
leftPlayers := collect.Filter(player.GameTable.Players, func(i int, p *Player) bool { |
|
|
|
//leftPlayers := collect.Filter(player.GameTable.Players, func(i int, p *Player) bool {
|
|
|
|
return p != nil && p.Status != 7 |
|
|
|
// return p != nil && p.Status != 7
|
|
|
|
}) |
|
|
|
//})
|
|
|
|
if len(leftPlayers) == 1 { |
|
|
|
//if len(leftPlayers) == 1 {
|
|
|
|
err := table.RoundOver() |
|
|
|
// err := table.RoundOver()
|
|
|
|
if err != nil { |
|
|
|
// if err != nil {
|
|
|
|
return &api.ResFail{Code: 500, Msg: err.Error()} |
|
|
|
// return &api.ResFail{Code: 500, Msg: err.Error()}
|
|
|
|
} |
|
|
|
// }
|
|
|
|
player.GameTable.NoticeAllPlayer(betNotice) |
|
|
|
// // player.GameTable.NoticeAllPlayer(betNotice)
|
|
|
|
|
|
|
|
// return &api.ResSuccess{}
|
|
|
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
// player.GameTable.NoticeAllPlayer(betNotice)
|
|
|
|
return &api.ResSuccess{} |
|
|
|
return &api.ResSuccess{} |
|
|
|
} |
|
|
|
|
|
|
|
player.GameTable.NoticeAllPlayer(betNotice) |
|
|
|
|
|
|
|
return nil |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func Check4Limited(player *Player, betChip int32) proto.Message { |
|
|
|
func Check4Limited(player *Player, betChip int32) proto.Message { |
|
|
|
|