Exemplo n.º 1
0
        /// <summary>
        /// 发牌动作
        /// </summary>
        private void GiveCardsA()
        {
            if (_serverSearInts.Count == 0)
            {
                return;
            }
            var gdata    = App.GetGameData <NnGameData>();
            var seat     = _serverSearInts[_giveCardsIndex];
            var userCtrl = gdata.GetPlayer <NnPlayer>(seat, true);
            var count    = userCtrl.Cards.Count;

            Debug.LogError("玩家【" + seat + "】 cards中有: " + count + "张牌");
            YxDebug.LogArray(userCtrl.Cards);
            count = count < 6 ? count : 5;
            Facade.Instance <MusicManager>().Play(GameSounds.Card);
            int i = 0;

            for (; i < count; i++)
            {
                var temp = Instantiate(Porker);
                var v    = Vector3.zero;
                temp.name             = "Porker" + i;
                temp.transform.parent = _giveCardsTarget[_giveCardsIndex].transform;
                var tempSprite = temp.GetComponent <UISprite>();
                if (seat == gdata.SelfSeat)
                {
                    switch (App.GameKey)
                    {
                    case "nn41":
                    case "nntp":
                        tempSprite.spriteName = "0x" + userCtrl.Cards[i].ToString("X");
                        Debug.LogError("牌值" + tempSprite.spriteName);
                        tempSprite.MakePixelPerfect();
                        temp.transform.localScale = new Vector3(1.4f, 1.3f, 0f);
                        v.x = v.x + (i * 114);
                        break;

                    default:
                        temp.transform.localScale = new Vector3(1.4f, 1.3f, 0f);
                        v.x = v.x + (i * 114);
                        break;
                    }
                }
                else
                {
                    temp.transform.localScale = Vector3.one;
                    v.x = v.x + (i * 32);
                }
                tempSprite.depth = 3 + _giveCardsIndex + i;
                var tempSposition = temp.GetComponent <SpringPosition>();
                tempSposition.target  = v;
                tempSposition.enabled = true;

                temp.SetActive(true);
                userCtrl.Porkers.Add(temp);
                //                YxDebug.Log(string.Format("牌的个数{0}和排的名字{1}", i, "0x" + userCtrl.Cards[i].ToString("X")));
            }
            //            YxDebug.Log("实际给玩家发 " + i + "张牌");
            _giveCardsIndex++;
        }
Exemplo n.º 2
0
        /// <summary>
        /// 显示玩家手牌信息
        /// </summary>
        /// <param name="panel"></param>
        /// <param name="user"></param>
        private void ShowOnesCards(DuifenPlayerPanel panel, ISFSObject user)
        {
            panel.CleanCards();

            if (!user.ContainsKey("cards"))
            {
                return;
            }


            int[] cards = user.GetIntArray("cards");
            YxDebug.LogArray(cards);
            int[] hidden = new int[2];

            if (cards != null && cards.Length > 0)
            {
                if (user.ContainsKey("hidden"))
                {
                    hidden = user.GetIntArray("hidden");
                    YxDebug.LogArray(cards);
                }

                int[] allCards = new int[hidden.Length + cards.Length];
                if (panel.PlayerType != (int)PlayerGameType.Fold)
                {
                    Array.Copy(hidden, 0, allCards, 0, hidden.Length);
                    Array.Copy(cards, 0, allCards, hidden.Length, cards.Length);
                }

                DealerMgr.DealOnesPokers(allCards, panel);
                panel.ShowPointLabel();
            }
        }
Exemplo n.º 3
0
        public static PokerType CheckFive(int[] valueArray, out HeldDate helddate, bool hasBKing, int suitState, int difCount)
        {
            Array.Sort(valueArray);
            YxDebug.LogArray(valueArray);
            var valueCount = valueArray.Length;
            var maxIndex   = valueCount - 1;
            var max        = valueArray[maxIndex];
            var minIndex   = hasBKing ? 1 : 0;
            var min        = valueArray[minIndex];
            var isShun     = (max - min) < 5;             //顺子
            var isSame     = GetOneCount(suitState) == 1; //是否同花

            YxDebug.Log("最大值: " + max + "  顺子:" + isShun + "  同花: " + isSame);
            if (isSame) //同花
            {
                helddate = new HeldDate(0x1f);
                if (!isShun)
                {
                    return(PokerType.Flush);                                 //同花顺
                }
                return(min > 9 ? PokerType.RoyalFlush : PokerType.StrFlush); //同花大顺  |  同花顺
            }
            if (isShun)                                                      //顺子
            {
                helddate = new HeldDate(0x1f);
                return(PokerType.Straight);
            }
            helddate = null;
            return(PokerType.None);
        }
Exemplo n.º 4
0
        /// <summary>
        /// 初始化玩家的手牌信息
        /// </summary>
        /// <param name="info"></param>
        /// <returns></returns>
        UserMatchInfo GetMatchInfo(ISFSObject info)
        {
            UserMatchInfo userMatchInfo = ParseMatchInfo(info);

            ISFSArray cardInfos = info.GetSFSArray("duninfo") ?? info.GetSFSObject("duns").GetSFSArray("duninfo");

            AddDunInfo(ref userMatchInfo, cardInfos);

            //检测
            YxDebug.LogArray(userMatchInfo.Cards);
            if (userMatchInfo.Cards.Count != 13)
            {
                Debug.LogError("手牌不是十三张!!");
                string errorMsg = string.Empty;
                foreach (var card in userMatchInfo.Cards)
                {
                    errorMsg += card + " , ";
                }
                Debug.LogError(errorMsg);
            }

            ISFSObject userScore = info.GetSFSObject("userscore");

            AddScoreInfo(ref userMatchInfo, userScore);

            if (info.ContainsKey("daqiang"))
            {
                userMatchInfo.Shoot = GetShootInfo(info);
            }

            return(userMatchInfo);
        }
Exemplo n.º 5
0
        private IEnumerator CheckNpcs(ISFSObject gameInfo)
        {
            var npslist = gameInfo.GetUtfStringArray("npc");

            YxDebug.LogArray(npslist);
            var maxNpcIndex = npslist.Length - 1;
            var isInit      = true;
            var gdata       = App.GetGameData <FishGameData>();
            var self        = App.GameData.GetPlayerInfo();
            var batterys    = GameMain.Singleton.PlayersBatterys;
            var coin        = gdata.NeedUpperScore ? batterys.MaxGunStyle * 30 : self.CoinA;

            while (true)
            {
                //查找所有空缺位置
                var vacants = new List <Player>();
                foreach (var player in _playerList)
                {
                    if (!player.IsHide())
                    {
                        continue;
                    }
                    if (Random.Range(0, 100) < 40)
                    {
                        continue;
                    }
                    vacants.Add(player);
                }
                YxDebug.Log("---准备加入rb【{0}】-----", "PlayerBatterys", null, vacants.Count);

                foreach (var player in vacants)
                {
                    var index   = Random.Range(0, maxNpcIndex);//随机获取机器人
                    var npcName = _npcs[index];
                    if (string.IsNullOrEmpty(npcName))
                    {
                        continue;                             //忽略
                    }
                    var obj = new SFSObject();
                    var x1  = Random.Range(coin * 0.8f, coin * 1.5f);//随机
                    //max*Random.Range(20, 100) + Random.Range(35342, 105480)
                    var ncoin = isInit ? x1 : 0;
                    obj.PutInt(RequestKey.KeyCoin, (int)ncoin);
                    obj.PutInt(RequestKey.KeySeat, player.Idx);
                    obj.PutInt("nid", index);
                    obj.PutUtfString(RequestKey.KeyName, npcName);
                    _npcs[index] = null;
                    AddPlayer(obj, true);
                }
                isInit = false;
                YxDebug.LogArray(_npcs);
                yield return(new WaitForSeconds(Random.Range(300f, 600f)));
            }
        }
Exemplo n.º 6
0
        internal void OnCompare(ISFSObject data)
        {
            DealerMgr.OnCompare();

            //隐藏不需要的内容
            SpeakMgr.ShowNothing();

            var gdata = App.GetGameData <PaiJiuGameData>();

            var userList = gdata.PlayerList;

            //刷新玩家比牌数据
            if (data.ContainsKey("compare"))
            {
                foreach (var sort in userList)
                {
                    var user = (PaiJiuPlayer)sort;
                    user.FinishSelect();
                }

                ISFSArray users = data.GetSFSArray("compare");
                foreach (ISFSObject user in users)
                {
                    int seat = user.GetInt("seat");
                    CompareMgr.AddSeat(seat);
                    SetUserCompareVal(user, seat);
                    AddShowedCards(user);
                }
                CompareMgr.StartCompare();
            }

            //刷新玩家手上筹码
            if (!data.ContainsKey("ttgold"))
            {
                return;
            }

            long[] ttgoldArr = data.GetLongArray("ttgold");
            YxDebug.LogArray(ttgoldArr, "Result Score ");

            //YxDebug.Log(" ==== 玩家总筹码刷新数据 ===== ");
            for (int i = 0; i < userList.Length; i++)
            {
                PaiJiuPlayer panel = gdata.GetPlayer <PaiJiuPlayer>(i, true);
                if (panel.Info == null)
                {
                    continue;
                }
                panel.ShowWinVal(ttgoldArr[i]);     //显示输赢(要在Gold赋值之前)
                panel.Info.CoinA = ttgoldArr[i];    //刷新数据
                panel.RefreshPanel();
            }
        }
Exemplo n.º 7
0
        public void SendreplacePokersDate(int ante, int[] changePokers = null)
        {
            YxDebug.Log("请求换牌");
            YxDebug.LogArray(changePokers);
            var data = new SFSObject();

            data.PutInt(RequestKey.KeyType, 2);
            if (changePokers != null)
            {
                data.PutIntArray(RequestKey.KeyCards, changePokers);
            }
            SendGameRequest(data);
        }
Exemplo n.º 8
0
        /// <summary>
        /// 初始化扑克数据
        /// </summary>
        /// <param name="datas">扑克数据</param>
        public void InitPokers(int[] datas)
        {
            YxDebug.LogError("第一次扑克");
            YxDebug.LogArray(datas);
            _rePlacePokers.Clear();
            var count = Mathf.Min(Pokers.Count, datas.Length);

            for (var i = 0; i < count; i++)
            {
                var poker = Pokers[i];
                poker.Init(datas[i]);
            }
        }
Exemplo n.º 9
0
        public void SetReplacePokers(int[] datas)
        {
            YxDebug.LogError("第二次扑克");
            YxDebug.LogArray(datas);
            var count = Mathf.Min(Pokers.Count, datas.Length);

            for (var i = 0; i < count; i++)
            {
                var poker = Pokers[i];
                var value = poker.Value;
                poker.SetValue(datas[i], value); //value);
            }
        }
Exemplo n.º 10
0
 void AddDunInfo(ref UserMatchInfo matchInfo, ISFSArray cardInfo)
 {
     YxDebug.Log(" ========== " + matchInfo.Seat + " ========== ");
     foreach (ISFSObject info in cardInfo)
     {
         matchInfo.DunTypeList.Insert(0, info.GetInt("type"));
         int[] cards = info.GetIntArray("cards");
         YxDebug.LogArray(cards);
         foreach (int card in cards)
         {
             matchInfo.Cards.Insert(0, card);
         }
     }
 }
Exemplo n.º 11
0
 public LSItemBase GetCheckColorItem(int index)
 {
     foreach (var item in Items)
     {
         if (index == item.index)
         {
             return(item);
         }
     }
     YxDebug.LogError("找不到对应的item,查找索引是:" + index);
     YxDebug.LogError("打印所有item ");
     YxDebug.LogArray(Items);
     return(null);
 }
Exemplo n.º 12
0
        /// <summary>
        /// 初始化某个玩家
        /// </summary>
        /// <param name="userInfo"></param>
        /// <param name="maxPoint"></param>
        void InitOne(ISFSObject userInfo, ref int maxPoint)
        {
            var gdata     = App.GetGameData <FillpitGameData>();
            int seat      = userInfo.GetInt("seat");
            int localSeat = gdata.GetLocalSeat(seat);
            var panel     = GetPlayerPanel(localSeat);

            if (userInfo.ContainsKey("cards"))
            {
                int[] cards = userInfo.GetIntArray("cards");
                YxDebug.LogArray(cards);
                DealerMgr.DealOnesPokers(cards, panel, localSeat);
            }
            if (userInfo.ContainsKey("state"))
            {
                bool isReady = userInfo.GetBool("state");
                panel.ReadyState = isReady;
                panel.ReadyStateFlag.SetActive(isReady && !gdata.IsGameing);
            }
            if (seat == gdata.Banker)
            {
                panel.SetBankIcon(true);
            }

            if (userInfo.ContainsKey("bet"))
            {
                panel.PlayerBet(userInfo.GetInt("bet"));
            }
            if (userInfo.ContainsKey("isgame") && !userInfo.GetBool("isgame"))
            {
                if (panel.ReadyState)
                {
                    panel.PlayerType = 3;
                    Color color = new Color(200 / 255f, 200 / 255f, 200 / 255f, 1);
                    panel.SetFoldCardColor(color);
                    panel.ShowGameType(GameRequestType.Fold);
                }
            }

            if (userInfo.ContainsKey("openCV"))
            {
                int openCv = userInfo.GetInt("openCV");
                panel.SetShownCardsPoint(openCv);
                if (openCv > maxPoint)
                {
                    maxPoint = openCv;
                }
            }
        }
Exemplo n.º 13
0
        public void OnFaPai(ISFSObject data)
        {
            var cards = data.GetIntArray(JlGameRequestConstKey.KeyCards);

            YxDebug.LogArray(cards);
            var cardsNum = data.GetUtfString(JlGameRequestConstKey.KeyCardsNum);

            string[] cardNums = cardsNum.Split(',');

            var sendObj = SFSObject.NewInstance();

            sendObj.PutIntArray("cards", cards);
            sendObj.PutUtfStringArray("cardsNum", cardNums);
            sendObj.PutInt("selfSeat", SelfLocalSeat);
            EventObj.SendEvent("TableViewEvent", "Allocate", sendObj);
        }
Exemplo n.º 14
0
 public void AddNpc(string npcName, int nid)
 {
     if (nid < 0)
     {
         return;
     }
     if (_npcs == null)
     {
         return;
     }
     if (nid >= _npcs.Length)
     {
         return;
     }
     _npcs[nid] = npcName;
     YxDebug.LogArray(_npcs);
 }
Exemplo n.º 15
0
        /// <summary>
        /// 初始化小结成员的信息
        /// </summary>
        /// <param name="data"></param>
        public void InitSumItem(Sfs2X.Entities.Data.ISFSObject data)
        {
            if (data.ContainsKey("seat"))
            {
                //获取信息
                int seat = data.GetInt("seat");
                var gdata = App.GetGameData<FillpitGameData>();
                var player = gdata.GetPlayerInfo(seat,true);
                if (player == null)
                {
                    gameObject.SetActive(false);
                    return;
                }

                _nameLabel.text = player.NickM;
                PortraitDb.SetPortrait(player.AvatarX, _headImage, player.SexI);

                _winValue = data.GetInt("win");
                _cardsValueLabel.text = _winValue.ToString();
                _cardsValueLabel.text = data.GetInt("cardsValue").ToString();
                _winGoldLabel.text = YxUtiles.ReduceNumber(_winValue);//App.GetGameData<GlobalData>().GetShowGold(_winValue);
                if (_allKillMark != null)
                {
                    bool isAllKill = (gdata.Dkak && (data.ContainsKey("doubleKing") && data.GetBool("doubleKing"))) ||
                                     (gdata.Sfak && (data.ContainsKey("sameFour") && data.GetBool("sameFour")));
                    _allKillMark.SetActive(_winValue > 0 && isAllKill);
                }

                SetUserCards(data.GetIntArray("cards"));
                YxDebug.LogArray(data.GetIntArray("cards"));

                if (data.ContainsKey("isgame") && _foldMark != null)
                {
                    _foldMark.SetActive(!data.GetBool("isgame"));
                }

                if (seat == gdata.SelfSeat)
                {
                    SetLabelColor(0xffff00);
                }
                _owenMark.SetActive(gdata.IsRoomGame && player.Id == gdata.OwnerId);
            }
        }
Exemplo n.º 16
0
        public override void GameResponseStatus(int type, ISFSObject response)
        {
            switch (type)
            {
            case 1:    //开始
            {
                var cards = response.GetIntArray(RequestKey.KeyCards);
                YxDebug.LogArray(cards);
                OnTurnPokers(cards);
            }
            break;

            case 2:    //换牌
            {
                var data  = response.GetSFSObject("data");
                var cards = data.GetIntArray(RequestKey.KeyCards);
                YxDebug.LogArray(cards);
                App.GetGameData <SalvoGameData>().GetPlayer().Info.CoinA = response.GetLong(RequestKey.KeyTotalGold);
                OnReplacePokers(cards);
            }
            break;
            }
        }
Exemplo n.º 17
0
        /// <summary>
        /// 获取好牌
        /// </summary>
        /// <param name="pokers"></param>
        /// <param name="helddate"></param>
        /// <returns></returns>
        public static PokerType GetGoodPokerIndex(int[] pokers, out HeldDate helddate)
        {
            var dict       = new Dictionary <int, HeldDate>();
            var suitState  = 0;
            var len        = pokers.Length;
            var valueArray = new int[len];
            var hasBKing   = false;
            var kingIndex  = -1;

            //采样
            for (var i = 0; i < len; i++)
            {
                var poker = pokers[i];
                var suit  = (poker >> 4) & 0xF; //花色
                var value = poker & 0xF;        //数值
                valueArray[i] = value;
                if (suit > 4)                   //大王
                {
                    hasBKing  = true;
                    kingIndex = i;
                    continue;
                }
                if (dict.ContainsKey(value))
                {
                    dict[value].Add(i);
                }
                else
                {
                    dict.Add(value, new HeldDate(0, i));
                }
                suitState |= (1 << (suit - 1));
            }
            YxDebug.LogArray(valueArray);
            //求出牌型
            var count = dict.Count;//不同值得个数

            YxDebug.Log("个数: " + count + ",     花色: " + Convert.ToString(suitState, 2).PadLeft(5, '0'));
            switch (count)
            {
            case 1:    //五条
                //直接返回5张
                helddate = new HeldDate(0x1f);
                return(PokerType.KindOf5);

            case 2:    //四条,葫芦      返回4张 或  5张
            {
                var values = dict.Values;
                var maxc   = hasBKing ? 3 : 4;
                foreach (var date in values)
                {
                    var vc = date.Count();
                    YxDebug.Log(vc + " : " + maxc);
                    if (vc < maxc)
                    {
                        continue;
                    }
                    helddate = date;
                    if (hasBKing)
                    {
                        helddate.Add(kingIndex);
                    }
                    return(PokerType.KindOf4);       //4条
                }
                helddate = new HeldDate(0x1f);       //葫芦
                return(PokerType.FullHouse);
            }

            case 3:    //三条,两对      返回3张或4张
            {
                var values = dict.Values;
                var temp   = new HeldDate();
                var maxc   = hasBKing ? 2 : 3;
                var minc   = hasBKing ? 1 : 2;
                foreach (var date in values)
                {
                    var vc = date.Count();
                    if (vc >= maxc)        //三条
                    {
                        helddate = date;
                        if (hasBKing)
                        {
                            helddate.Add(kingIndex);
                        }
                        return(PokerType.KindOf3);
                    }
                    if (vc >= minc)
                    {
                        temp = temp | date;
                    }
                }
                helddate = temp;         //两对
                if (hasBKing)
                {
                    helddate.Add(kingIndex);
                }
                return(PokerType.PairOf2);
            }

            case 4:    //一对         返回2张
            {
                var maxc = 2;
                if (hasBKing)
                {
                    var type = CheckFive(valueArray, out helddate, true, suitState, count);
                    if (type != PokerType.None)
                    {
                        return(type);
                    }
                    maxc = 1;
                }
                HeldDate max  = null;
                var      temp = 0;
                foreach (var date in dict)
                {
                    var key   = date.Key;
                    var value = date.Value;
                    var vc    = value.Count();
                    if (key < MinJack)
                    {
                        continue;                        //是否大于最小对
                    }
                    if (vc < maxc)
                    {
                        continue;                    //是否是一对
                    }
                    if (temp > key)
                    {
                        continue;
                    }
                    temp = key;
                    max  = value;
                }
                helddate = max;
                if (max == null)
                {
                    return(PokerType.None);
                }
                if (hasBKing)
                {
                    helddate.Add(kingIndex);
                }
                return(PokerType.JacksUp);
            }

            case 5:    //杂牌,同花大顺,同花顺,同花,顺子
                return(CheckFive(valueArray, out helddate, hasBKing, suitState, count));

            default:
                helddate = null;
                return(PokerType.None);
            }
        }
Exemplo n.º 18
0
        public void SortHandList(ref List <int> list)
        {
            list.Sort();
            List <CardGroup> groupList = new List <CardGroup>();

            while (list.Count > 0)
            {
                CardGroup group = new CardGroup();
                int       temp  = list[0];
                group.CardValue = temp;
                var sortGroup = temp >> 4;
                switch (sortGroup)
                {
                case 1:
                    group.GValue = 4;
                    break;

                case 2:
                    group.GValue = 2;
                    break;

                case 3:
                    group.GValue = 3;
                    break;

                case 4:
                    group.GValue = 1;
                    break;
                }
                list.RemoveAt(0);
                groupList.Add(group);
            }
            groupList.Sort((a, b) =>
            {
                if (a.GValue > b.GValue)
                {
                    return(1);
                }
                if (a.GValue < b.GValue)
                {
                    return(-1);
                }

                if (a.GValue == b.GValue)
                {
                    if (a.CardValue > b.CardValue)
                    {
                        return(1);
                    }
                    if (a.CardValue < b.CardValue)
                    {
                        return(-1);
                    }
                }
                return(0);
            });
            foreach (CardGroup t in groupList)
            {
                list.Add(t.CardValue);
            }
            YxDebug.LogArray(list);
        }
Exemplo n.º 19
0
        public override void GameResponseStatus(int type, ISFSObject response)
        {
            YxDebug.Log("Request == " + (GameRequestType)type);
            var gdata = App.GetGameData <FillpitGameData>();

            if (response.ContainsKey("anteRate"))
            {
                YxDebug.Log("===============================");
                YxDebug.LogArray(response.GetIntArray("anteRate"));
                BetMgr.SetAddBtns(response.GetIntArray("anteRate"));
            }

            if (!App.GetRServer <FillpitGameServer>().HasGetGameInfo)
            {
                return;
            }

            GameRequestType gameType = (GameRequestType)type;
            int             selfSeat = gdata.SelfSeat;

            switch (gameType)
            {
            case GameRequestType.Bet:

                //当存在users时,说明下盲注,这个名游戏已经开始
                if (response.ContainsKey("users"))
                {
                    OnBetBlinds(response);
                    //投盲注,如果烂底,盲注值为0
                    gdata.IsLanDi = response.ContainsKey("landi") && response.GetBool("landi");
                }

                if (response.ContainsKey("banker"))
                {
                    var banker   = response.GetInt("banker");
                    var betPanel = GetPlayerPanel(banker, true);
                    betPanel.SetBankIcon(true);
                }

                //此为某个玩家下注
                if (response.ContainsKey("seat"))
                {
                    int betGold = response.GetInt("gold");
                    int betseat = response.GetInt("seat");

                    gdata.LastBetValue = betGold;

                    var betPanel = GetPlayerPanel(betseat, true);
                    betPanel.PlayerBet(betGold, true, 200);
                    betPanel.ShowGameType(gameType);
                    if (response.ContainsKey("speakerType"))
                    {
                        betPanel.Speak((GameRequestType)response.GetInt("speakerType"), betGold);
                    }

                    LaddyMgr.OnPlayerBet(betGold);

                    if (betseat == selfSeat)
                    {
                        SpeakMgr.ShowNothing();
                    }
                }


                break;

            case GameRequestType.BetSpeak:
                int bseat = response.GetInt("seat");       //当前座位号
                Speaker(bseat, response.ContainsKey("cd") ? response.GetInt("cd") : 30f, GameRequestType.BetSpeak);
                break;

            case GameRequestType.Card:

                HideAllPalyerGameType(false);

                int[] cardSeats = response.GetIntArray("seats");
                DealerMgr.FirstSeat = response.GetInt("fs");

                int curCard = response.GetInt("curCardRound");
                LaddyMgr.OnDealCard(curCard);

                //新游戏开始,第一轮发牌带上隐藏牌
                if (curCard == 1)
                {
                    var count = DealerMgr.HideN;
                    for (int i = 0; i < count; i++)
                    {
                        int[] pokers = new int[cardSeats.Length];
                        DealerMgr.BeginBigDeal(pokers, cardSeats);
                    }
                }

                //如果存在私人牌,则将牌赋值到对应手牌处
                if (response.ContainsKey("selfCard") && response.GetIntArray("selfCard").Length >= 0)
                {
                    int[] selfCards = response.GetIntArray("selfCard");
                    YxDebug.LogArray(selfCards);
                    GetPlayerPanel().UserBetPoker.SetHandPokersValue(selfCards);
                }

                //将每个玩家明牌点数显示出来
                if (response.ContainsKey("openCV"))
                {
                    int seatCount          = cardSeats.Length;
                    var openCardValueArray = response.GetIntArray("openCV");
                    int openMax            = -1;
                    foreach (var openVal in openCardValueArray)
                    {
                        if (openMax < openVal)
                        {
                            openMax = openVal;
                        }
                    }
                    int arrayLength = openCardValueArray.Length;
                    for (int i = 0; i < arrayLength; i++)
                    {
                        int cvSeat  = cardSeats[i % seatCount];
                        int openVal = openCardValueArray[i];
                        var panel   = GetPlayerPanel(cvSeat, true);
                        panel.SetShownCardsPoint(openVal);
                        panel.SetMaxPoint(openMax);
                        panel.ShowPointLabel();
                    }
                }

                if (response.ContainsKey("selfCV"))
                {
                    gdata.GetPlayer <PlayerPanel>().SetAllCardPoint(response.GetInt("selfCV"));
                }

                //是否有公共牌,如果有,说明牌数少于在座人数
                //公共牌用于发给其余多的人
                if (response.ContainsKey("publicCard"))
                {
                    DealerMgr.PublicCardId = response.GetInt("publicCard");
                }

                if (response.ContainsKey("cardsArr"))
                {
                    ISFSArray cardsArray = response.GetSFSArray("cardsArr");
                    int       arraycount = cardsArray.Count;
                    for (int i = 0; i < arraycount; i++)
                    {
                        DealerMgr.BeginBigDeal(cardsArray.GetIntArray(i), cardSeats);
                    }
                }
                else
                {
                    DealerMgr.BeginBigDeal(response.GetIntArray("cards"), cardSeats);       //当有selfCard时,要将发牌重置到从第0张发
                }

                HideAllPalyerGameType(false);
                gdata.LastBetValue = 0;          //将最后一次下注重置,避免下次跟注时出现问题
                break;

            case GameRequestType.Fold:
                int foldSeat = response.GetInt("seat");
                YxClockManager.StopWaitPlayer();
                var foldPanel = GetPlayerPanel(foldSeat, true);
                foldPanel.Speak(GameRequestType.Fold);

                if (foldSeat == selfSeat)
                {
                    SpeakMgr.ShowNothing();
                }
                YxDebug.Log("玩家 " + foldSeat + " 弃牌!!");
                break;

            case GameRequestType.FollowSpeak:       //  跟注
                int followSeat = response.GetInt("seat");

                Speaker(followSeat, response.ContainsKey("cd") ? response.GetInt("cd") : 30f, gdata.LastBetValue > 0
                                ? GameRequestType.FollowSpeak
                                : GameRequestType.BetSpeak);
                var followPanel = GetPlayerPanel(followSeat, true);
                followPanel.HideGameType();
                break;


            case GameRequestType.KickSpeak:
                int kickSeat = response.GetInt("seat");
                Speaker(kickSeat, response.ContainsKey("cd") ? response.GetInt("cd") : 30f,
                        GameRequestType.KickSpeak);
                break;

            case GameRequestType.NotKick:

                int notKickSeat = response.GetInt("seat");
                YxClockManager.StopWaitPlayer();
                var notkickspeaker = gdata.GetPlayer <PlayerPanel>(notKickSeat, true);
                notkickspeaker.Speak(GameRequestType.NotKick);

                if (notKickSeat == selfSeat)
                {
                    SpeakMgr.ShowNothing();
                }
                break;

            case GameRequestType.Result:
                DealerMgr.FastDeal();          //把堆积的牌全部发出去
                gdata.IsGameing = false;
                if (response.ContainsKey("result"))
                {
                    YxClockManager.StopWaitPlayer();
                    bool isLandi = response.ContainsKey("landi") && response.GetBool("landi");
                    gdata.IsLanDi = isLandi;
                    AnimationMgr.SetResultLanDiAnim(isLandi);

                    HideAllPalyerGameType(true);

                    ISFSArray resultArray = response.GetSFSArray("result");
                    ShowPlayerCardsPoint(resultArray);
                    //是否是烂底
                    //如果烂底,直接显示结算结果,否则显示胜利动画
                    if (!isLandi)
                    {
                        ShowWinAnim(resultArray);
                    }
                    else
                    {
                        LaddyMgr.DeductHappys();
                    }
                    SummaryMgr.OnGameResult(resultArray);


                    //初始化玩家游戏币
                    foreach (ISFSObject resultItem in resultArray)
                    {
                        int resultSeat  = resultItem.GetInt("seat");
                        var resultPanel = GetPlayerPanel(resultSeat, true);
                        resultPanel.OnGameResult(resultItem);
                    }
                }

                break;


            case GameRequestType.BackKick:

                int backKickSeat = response.GetInt("seat");

                Speaker(backKickSeat, response.ContainsKey("cd") ? response.GetInt("cd") : 30f,
                        GameRequestType.BackKick);
                break;

            case GameRequestType.StartGame:
                //开始游戏,服务器标记本房间已经开始游戏,所以本机必须发送ready
                //为防止本机出现显示数据异常,以服务器信息为准
                if (response.ContainsKey("isStart") && response.GetBool("isStart"))
                {
                    App.GetRServer <FillpitGameServer>().ReadyGame();
                    WeiChatInvite.SetWeiChatBtnActive(false);
                }
                break;
            }
        }