/// <summary>
    /// 判断手牌中是否有该花色的副牌
    /// </summary>
    /// <param name="mPokerType"></param>
    /// <returns></returns>
    public static bool IsContainTypePoke(List <PokerInfo> myRestPokerList, int mLevelPokerNum,
                                         Consts.PokerType mPokerType,
                                         out List <PokerInfo> typeList)
    {
        // 优先使用热更新的代码
        if (ILRuntimeUtil.getInstance().checkDllClassHasFunc("PlayRuleUtil_hotfix", "IsContainTypePoke"))
        {
            typeList = new List <PokerInfo>();
            bool b = (bool)ILRuntimeUtil.getInstance().getAppDomain().Invoke("HotFix_Project.PlayRuleUtil_hotfix", "IsContainTypePoke", null, myRestPokerList, mLevelPokerNum, mPokerType, typeList);
            return(b);
        }

        typeList = new List <PokerInfo>();
        for (int i = 0; i < myRestPokerList.Count; i++)
        {
            PokerInfo myRestPoker = myRestPokerList[i];
            if (myRestPoker.m_pokerType == mPokerType && myRestPoker.m_num != mLevelPokerNum)
            {
                typeList.Add(myRestPokerList[i]);
            }
        }

        if (typeList.Count > 0)
        {
            typeList = typeList.OrderBy(a => a.m_weight).ToList();
            return(true);
        }

        return(false);
    }
    public List <PokerInfo> GetPokerTypePoker(Consts.PokerType pokerType)
    {
        // 优先使用热更新的代码
        if (ILRuntimeUtil.getInstance().checkDllClassHasFunc("LiangZhu_hotfix", "GetPokerTypePoker"))
        {
            List <PokerInfo> list = (List <PokerInfo>)ILRuntimeUtil.getInstance().getAppDomain().Invoke("HotFix_Project.LiangZhu_hotfix", "GetPokerTypePoker", null, pokerType);
            return(list);
        }

        List <PokerInfo> pokerInfos = new List <PokerInfo>();

        for (int i = 0; i < liangzhuPoker.Count; i++)
        {
            if (liangzhuPoker[i].m_pokerType == pokerType)
            {
                pokerInfos.Add(liangzhuPoker[i]);
            }

            if (pokerInfos.Count == 2)
            {
                break;
            }
        }
        return(pokerInfos);
    }
Beispiel #3
0
    /// <summary>
    /// 得到指定花色的副牌,并排序
    /// </summary>
    /// <param name="pokerList"></param>
    /// <param name="mPokerType"></param>
    public static List <PokerInfo> GetPokerByType(List <PokerInfo> pokerList, int mLevelPokerNum,
                                                  Consts.PokerType mPokerType)
    {
        List <PokerInfo> list = new List <PokerInfo>();

        for (int i = 0; i < pokerList.Count; i++)
        {
            var poker = pokerList[i];
            if (poker.m_pokerType == mPokerType && poker.m_num != mLevelPokerNum)
            {
                list.Add(poker);
            }
        }
        return(list.OrderBy(a => a.m_weight).ToList());
    }
    /// <summary>
    ///  给weight重新赋值,从2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17
    ///  17为大王,16为小王,15为主级牌,14为副级牌
    ///  无主情况下,16为大王,15为小王,14为级牌
    /// </summary>
    /// <param name="list">牌</param>
    /// <param name="levelPokerNum">级牌</param>
    /// <param name="masterPokerType">主牌花色</param>
    /// <returns></returns>
    public static List <PokerInfo> SetPokerWeight(List <PokerInfo> list, int levelPokerNum,
                                                  Consts.PokerType masterPokerType)
    {
        // 优先使用热更新的代码
        if (ILRuntimeUtil.getInstance().checkDllClassHasFunc("PlayRuleUtil_hotfix", "SetPokerWeight"))
        {
            List <PokerInfo> list_temp = (List <PokerInfo>)ILRuntimeUtil.getInstance().getAppDomain().Invoke("HotFix_Project.PlayRuleUtil_hotfix", "SetPokerWeight", null, list, levelPokerNum, masterPokerType);
            return(list_temp);
        }

        for (int i = 0; i < list.Count; i++)
        {
            PokerInfo pokerInfo = list[i];
            //是级牌
            if (pokerInfo.m_num == levelPokerNum)
            {
                if (pokerInfo.m_pokerType == masterPokerType)
                {
                    pokerInfo.m_weight = 15;
                }
                else
                {
                    pokerInfo.m_weight = 14;
                }
            }
            //大王
            else if (pokerInfo.m_num == 16)
            {
                pokerInfo.m_weight = (int)masterPokerType != (-1) ? 17 : 16;
            }
            //小王
            else if (pokerInfo.m_num == 15)
            {
                pokerInfo.m_weight = (int)masterPokerType != (-1) ? 16 : 15;
            }
            else if (pokerInfo.m_num < levelPokerNum)
            {
                pokerInfo.m_weight = pokerInfo.m_num;
            }
            else
            {
                pokerInfo.m_weight = pokerInfo.m_num - 1;
            }
        }
        return(list);
    }
    /// <summary>
    /// 得到指定花色的副牌,并排序
    /// </summary>
    /// <param name="pokerList"></param>
    /// <param name="mPokerType"></param>
    public static List <PokerInfo> GetPokerByType(List <PokerInfo> pokerList, int mLevelPokerNum,
                                                  Consts.PokerType mPokerType)
    {
        // 优先使用热更新的代码
        if (ILRuntimeUtil.getInstance().checkDllClassHasFunc("PlayRuleUtil_hotfix", "GetPokerByType"))
        {
            List <PokerInfo> list_temp = (List <PokerInfo>)ILRuntimeUtil.getInstance().getAppDomain().Invoke("HotFix_Project.PlayRuleUtil_hotfix", "GetPokerByType", null, pokerList, mLevelPokerNum, mPokerType);
            return(list_temp);
        }

        List <PokerInfo> list = new List <PokerInfo>();

        for (int i = 0; i < pokerList.Count; i++)
        {
            var poker = pokerList[i];
            if (poker.m_pokerType == mPokerType && poker.m_num != mLevelPokerNum)
            {
                list.Add(poker);
            }
        }
        return(list.OrderBy(a => a.m_weight).ToList());
    }
Beispiel #6
0
    /// <summary>
    /// 判断手牌中是否有该花色的副牌
    /// </summary>
    /// <param name="mPokerType"></param>
    /// <returns></returns>
    public static bool IsContainTypePoke(List <PokerInfo> myRestPokerList, int mLevelPokerNum,
                                         Consts.PokerType mPokerType,
                                         out List <PokerInfo> typeList)
    {
        typeList = new List <PokerInfo>();
        for (int i = 0; i < myRestPokerList.Count; i++)
        {
            PokerInfo myRestPoker = myRestPokerList[i];
            if (myRestPoker.m_pokerType == mPokerType && myRestPoker.m_num != mLevelPokerNum)
            {
                typeList.Add(myRestPokerList[i]);
            }
        }

        if (typeList.Count > 0)
        {
            typeList = typeList.OrderBy(a => a.m_weight).ToList();
            return(true);
        }

        return(false);
    }
Beispiel #7
0
 /// <summary>
 ///  给weight重新赋值,从2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17
 ///  17为大王,16为小王,15为主级牌,14为副级牌
 ///  无主情况下,16为大王,15为小王,14为级牌
 /// </summary>
 /// <param name="list">牌</param>
 /// <param name="levelPokerNum">级牌</param>
 /// <param name="masterPokerType">主牌花色</param>
 /// <returns></returns>
 public static List <PokerInfo> SetPokerWeight(List <PokerInfo> list, int levelPokerNum,
                                               Consts.PokerType masterPokerType)
 {
     for (int i = 0; i < list.Count; i++)
     {
         PokerInfo pokerInfo = list[i];
         //是级牌
         if (pokerInfo.m_num == levelPokerNum)
         {
             if (pokerInfo.m_pokerType == masterPokerType)
             {
                 pokerInfo.m_weight = 15;
             }
             else
             {
                 pokerInfo.m_weight = 14;
             }
         }
         //大王
         else if (pokerInfo.m_num == 16)
         {
             pokerInfo.m_weight = (int)masterPokerType != (-1) ? 17 : 16;
         }
         //小王
         else if (pokerInfo.m_num == 15)
         {
             pokerInfo.m_weight = (int)masterPokerType != (-1) ? 16 : 15;
         }
         else if (pokerInfo.m_num < levelPokerNum)
         {
             pokerInfo.m_weight = pokerInfo.m_num;
         }
         else
         {
             pokerInfo.m_weight = pokerInfo.m_num - 1;
         }
     }
     return(list);
 }
Beispiel #8
0
    public void UpdateUi(List <PokerInfo> list)
    {
        // 优先使用热更新的代码
        if (ILRuntimeUtil.getInstance().checkDllClassHasFunc("TestPoker_hotfix", "UpdateUi"))
        {
            ILRuntimeUtil.getInstance().getAppDomain().Invoke("HotFix_Project.TestPoker_hotfix", "UpdateUi", null, list);
            return;
        }

        for (int i = 0; i < list.Count; i++)
        {
            PokerInfo pokerInfo = list[i];
            //大小王
            if (pokerInfo.m_num == 15)
            {
                if (xiaoWangList.Count == 2 || xiaoWangList.Count == 1)
                {
                    xiaoWangList[0].color = Color.gray;
                    xiaoWangList.Remove(xiaoWangList[0]);
                }
            }
            else if (pokerInfo.m_num == 16)
            {
                if (daWangList.Count == 2 || daWangList.Count == 1)
                {
                    daWangList[0].color = Color.gray;
                    daWangList.Remove(daWangList[0]);
                }
            }
            else if (pokerInfo.m_num < 15 && pokerInfo.m_num >= 2)
            {
                Consts.PokerType Type = pokerInfo.m_pokerType;

                List <PokerInfo> listPoker;
                dicPokerData.TryGetValue(Type, out listPoker);

                List <GameObject> listGo;
                dictionaryGo.TryGetValue(Type, out listGo);

                int index = -1;
                if (listPoker != null)
                {
                    for (int j = 0; j < listPoker.Count; j++)
                    {
                        var item = listPoker[j];
                        if (pokerInfo.m_num == item.m_num && pokerInfo.m_pokerType == item.m_pokerType)
                        {
                            index = listPoker.IndexOf(item);
                            listPoker.Remove(item);
                            break;
                        }
                    }
                }
                if (index == -1)
                {
                    return;
                }
                try
                {
                    if (listGo != null)
                    {
                        GameObject go = listGo[index];
                        go.GetComponent <Image>().color = Color.gray;
                        listGo.Remove(go);
                    }
                }
                catch (Exception e)
                {
                    Console.WriteLine(e);
                }
            }
            else
            {
                throw new Exception("牌的num异常");
            }
        }
    }
Beispiel #9
0
    public void Init(GameObject gameObject, Consts.PokerType pokerType)
    {
        // 优先使用热更新的代码
        if (ILRuntimeUtil.getInstance().checkDllClassHasFunc("TestPoker_hotfix", "Init"))
        {
            ILRuntimeUtil.getInstance().getAppDomain().Invoke("HotFix_Project.TestPoker_hotfix", "Init", null, gameObject, pokerType);
            return;
        }

        //初始化数据

        List <PokerInfo>  heiTaoPokers = new List <PokerInfo>();
        List <GameObject> PokerItems   = new List <GameObject>();

        for (int i = 0; i < 2; i++)
        {
            for (int j = 2; j < 15; j++)
            {
                heiTaoPokers.Add(new PokerInfo(j, pokerType));
            }
        }
        heiTaoPokers = heiTaoPokers.OrderByDescending(a => a.m_num).ToList();
        if (!dicPokerData.ContainsKey(pokerType))
        {
            dicPokerData.Add(pokerType, heiTaoPokers);
        }

        //初始化UI
        for (int i = 0; i < heiTaoPokers.Count; i++)
        {
            PokerInfo poker = heiTaoPokers[i];

            GameObject go      = GameObject.Instantiate(ItemPoker, gameObject.transform);
            var        btn     = go.AddComponent <Button>();
            var        image   = go.GetComponent <Image>();
            bool       isClick = false;
            btn.onClick.AddListener(() =>
            {
                if (!isClick)
                {
                    image.color = Color.gray;
                    selectedPokers.Add(poker);
                    isClick   = true;
                    text.text = "当前选择:" + selectedPokers.Count + "张";
                }
                else
                {
                    image.color = Color.white;
                    selectedPokers.Remove(poker);
                    isClick   = false;
                    text.text = "当前选择:" + selectedPokers.Count + "张";
                }
            });

            PokerItems.Add(go);
            string temp = null;
            switch (pokerType)
            {
            case Consts.PokerType.PokerType_FangKuai:
                temp = "icon_fangkuai";
                break;

            case Consts.PokerType.PokerType_HeiTao:
                temp = "icon_heitao";
                break;

            case Consts.PokerType.PokerType_HongTao:
                temp = "icon_hongtao";
                break;

            case Consts.PokerType.PokerType_MeiHua:
                temp = "icon_meihua";
                break;
            }
            CommonUtil.setImageSpriteByAssetBundle(go.transform.Find("Type").GetComponent <Image>(), "poker.unity3d", temp);
            int num = poker.m_num;
            if (num >= 2 && num <= 10)
            {
                go.GetComponentInChildren <Text>().text = num.ToString();
            }
            else
            {
                if (num == 11)
                {
                    go.GetComponentInChildren <Text>().text = "J";
                }
                else if (num == 12)
                {
                    go.GetComponentInChildren <Text>().text = "Q";
                }
                else if (num == 13)
                {
                    go.GetComponentInChildren <Text>().text = "K";
                }
                else if (num == 14)
                {
                    go.GetComponentInChildren <Text>().text = "A";
                }
            }
        }
        if (!dictionaryGo.ContainsKey(pokerType))
        {
            dictionaryGo.Add(pokerType, PokerItems);
        }
    }
    /// <summary>
    /// 只在客户端调用,得到能够亮主的牌
    /// </summary>
    /// <param name="handerPoker"></param>
    /// <param name="liangZhuPoker"></param>
    /// <param name="mLevelPokerNum"></param>
    /// <param name="masterPokerType"></param>
    /// <returns></returns>
    public static List <PokerInfo> GetLiangzhuPoker(List <PokerInfo> handerPoker, List <PokerInfo> liangZhuPoker,
                                                    int mLevelPokerNum,
                                                    int masterPokerType)
    {
        // 优先使用热更新的代码
        if (ILRuntimeUtil.getInstance().checkDllClassHasFunc("PlayRuleUtil_hotfix", "GetLiangzhuPoker"))
        {
            List <PokerInfo> list_temp = (List <PokerInfo>)ILRuntimeUtil.getInstance().getAppDomain().Invoke("HotFix_Project.PlayRuleUtil_hotfix", "GetLiangzhuPoker", null, handerPoker, liangZhuPoker, mLevelPokerNum, masterPokerType);
            return(list_temp);
        }

        List <PokerInfo> pokerInfos   = new List <PokerInfo>();
        List <PokerInfo> jiPaiAndWang = PlayRuleUtil.GetJiPaiAndWang(handerPoker, mLevelPokerNum);

        if (jiPaiAndWang.Count == 0)
        {
            return(pokerInfos);
        }

        //第一次亮主
        if (liangZhuPoker == null || liangZhuPoker.Count == 0)
        {
            for (int i = 0; i < handerPoker.Count; i++)
            {
                if (handerPoker[i].m_num == mLevelPokerNum)
                {
                    pokerInfos.Add(handerPoker[i]);
                }
            }
            List <PokerInfo> doublePoker = PlayRuleUtil.GetDoublePoker(jiPaiAndWang);
            //大小王
            foreach (var poker in doublePoker)
            {
                if (poker.m_pokerType == Consts.PokerType.PokerType_Wang)
                {
                    pokerInfos.Add(poker);
                }
            }
            return(pokerInfos);
        }
        else if (liangZhuPoker.Count == 1)
        {
            List <PokerInfo> doublePoker = PlayRuleUtil.GetDoublePoker(jiPaiAndWang);
            return(doublePoker);
        }
        else if (liangZhuPoker.Count == 2)
        {
            Consts.PokerType mPokerType  = liangZhuPoker[0].m_pokerType;
            List <PokerInfo> doublePoker = PlayRuleUtil.GetDoublePoker(jiPaiAndWang);
            for (int i = 0; i < doublePoker.Count - 1; i += 2)
            {
                if (doublePoker[i].m_pokerType > mPokerType)
                {
                    pokerInfos.Add(doublePoker[i]);
                    pokerInfos.Add(doublePoker[i + 1]);
                }

                if (liangZhuPoker[0].m_num == 15 && doublePoker[i].m_num == 16)
                {
                    pokerInfos.Add(doublePoker[i]);
                    pokerInfos.Add(doublePoker[i + 1]);
//                    ToastScript.createToast("dawang");
                }
            }
            return(pokerInfos);
        }
        else
        {
            return(pokerInfos);
        }
    }
Beispiel #11
0
    /// <summary>
    /// 得到甩牌是否成功后的牌
    /// </summary>
    /// <param name="room"></param>
    /// <param name="outPokerList"></param>
    /// <returns></returns>
    public static List <PokerInfo> GetShuaiPaiPoker(RoomData room, List <PokerInfo> outPokerList)
    {
        List <PokerInfo> resultList = new List <PokerInfo>();

        //设置牌的权重
        SetPokerWeight(outPokerList, room.m_levelPokerNum, (Consts.PokerType)room.m_masterPokerType);

        List <PlayerData> playerDatas = room.getPlayerDataList();

        //设置牌的权重
        foreach (var playerData in playerDatas)
        {
            SetPokerWeight(playerData.m_curOutPokerList, room.m_levelPokerNum,
                           (Consts.PokerType)room.m_masterPokerType);
            SetPokerWeight(playerData.getPokerList(), room.m_levelPokerNum, (Consts.PokerType)room.m_masterPokerType);
        }
        //得到甩牌的对子
        List <PokerInfo> firestDoubleList = GetDoublePoker(outPokerList);
        //得到甩牌的单牌
        List <PokerInfo> firestSingleList = GetSinglePoker(outPokerList, firestDoubleList);

        //甩牌中最小的单牌

        PokerInfo minSingle = null;

        if (firestSingleList.Count > 0)
        {
            minSingle = firestSingleList[0];
        }
        //TLJ_PlayService.PlayService.log.Info("有几个玩家:" + playerDatas.Count);
        //        PlayService.log.Warn($"第一个人出牌uid:{room.m_curRoundFirstPlayer.m_uid}");
        //如果甩的牌都是主牌
        if (IsAllMasterPoker(outPokerList, room.m_levelPokerNum, room.m_masterPokerType))
        {
            for (int i = 0; i < playerDatas.Count; i++)
            {
                if (playerDatas[i].m_uid == room.m_curRoundFirstPlayer.m_uid)
                {
                    continue;
                }
                //得到其余玩家的手牌
                List <PokerInfo> pokerList   = playerDatas[i].getPokerList();
                List <PokerInfo> masterPoker = GetMasterPoker(pokerList, room.m_levelPokerNum, room.m_masterPokerType);
                if (masterPoker.Count > 0)
                {
                    //得到主牌中的对子和单牌
                    List <PokerInfo> OtherDoubleleList = GetDoublePoker(masterPoker);
                    List <PokerInfo> OtherSingleList   = GetSinglePoker(masterPoker, OtherDoubleleList);
                    //没有单牌
                    if (firestSingleList.Count == 0)
                    {
                        List <List <PokerInfo> > OtherTlj;
                        List <PokerInfo>         compareDoublePoker = CompareDoublePoker(firestDoubleList, OtherDoubleleList,
                                                                                         room.m_levelPokerNum, room.m_masterPokerType, out OtherTlj);
                        if (compareDoublePoker.Count > 0)
                        {
                            return(compareDoublePoker);
                        }
                    }
                    //最小的单牌牌都比其他玩家手牌中的最大主牌大
                    else if (minSingle.m_weight >= masterPoker[masterPoker.Count - 1].m_weight)
                    {
                        List <List <PokerInfo> > OtherTlj;
                        List <PokerInfo>         compareDoublePoke = CompareDoublePoker(firestDoubleList, OtherDoubleleList,
                                                                                        room.m_levelPokerNum, room.m_masterPokerType, out OtherTlj);
                        if (compareDoublePoke.Count > 0)
                        {
                            return(compareDoublePoke);
                        }
                    }
                    //甩牌失败,单牌比别人小
                    else
                    {
                        TLJ_PlayService.PlayService.log.Info("甩牌失败,单牌比别人小");
                        resultList.Add(minSingle);
                        return(resultList);
                    }
                }
                //其他玩家没有主牌
                else
                {
                    //该玩家牌大,不作处理
                }
            }
        }
        //同花色的副牌
        else if (IsAllFuPoker(outPokerList, room.m_levelPokerNum, room.m_masterPokerType))
        {
            Consts.PokerType mPokerType = outPokerList[0].m_pokerType;
            for (int i = 0; i < playerDatas.Count; i++)
            {
                if (playerDatas[i].m_uid == room.m_curRoundFirstPlayer.m_uid)
                {
                    continue;
                }
                //得到其余玩家的手牌
                List <PokerInfo> pokerList = playerDatas[i].getPokerList();
                //得到指定花色的牌
                List <PokerInfo> pokerByType = GetPokerByType(pokerList, room.m_levelPokerNum, mPokerType);

                if (pokerByType.Count > 0)
                {
                    //得到副牌中的对子和单牌
                    List <PokerInfo> OtherDoubleleList = GetDoublePoker(pokerByType);
                    List <PokerInfo> OtherSingleList   = GetSinglePoker(pokerByType, OtherDoubleleList);
                    //没有单牌
                    if (firestSingleList.Count == 0)
                    {
                        List <List <PokerInfo> > OtherTlj;
                        List <PokerInfo>         compareDoublePoke = CompareDoublePoker(firestDoubleList, OtherDoubleleList,
                                                                                        room.m_levelPokerNum, room.m_masterPokerType, out OtherTlj);
                        if (compareDoublePoke.Count > 0)
                        {
                            return(compareDoublePoke);
                        }
                    }
                    //最小的单牌牌都比其他玩家手牌中的最大主牌大
                    else if (minSingle.m_weight >= pokerByType[pokerByType.Count - 1].m_weight)
                    {
                        List <List <PokerInfo> > OtherTlj;
                        List <PokerInfo>         compareDoublePoke = CompareDoublePoker(firestDoubleList, OtherDoubleleList,
                                                                                        room.m_levelPokerNum, room.m_masterPokerType, out OtherTlj);
                        if (compareDoublePoke.Count > 0)
                        {
                            return(compareDoublePoke);
                        }
                    }
                    //甩牌失败,单牌比别人小
                    else
                    {
                        TLJ_PlayService.PlayService.log.Info("甩牌失败,单牌比别人小");
                        resultList.Add(minSingle);
                        return(resultList);
                    }
                }
                //其他玩家没有副牌
                else
                {
                    //该玩家牌大,不作处理
                }
            }
        }
        return(resultList);
    }
Beispiel #12
0
    /// <summary>
    /// 只在客户端调用,得到能够亮主的牌
    /// </summary>
    /// <param name="handerPoker"></param>
    /// <param name="liangZhuPoker"></param>
    /// <param name="mLevelPokerNum"></param>
    /// <param name="masterPokerType"></param>
    /// <returns></returns>
    public static List <PokerInfo> GetLiangzhuPoker(List <PokerInfo> handerPoker, List <PokerInfo> liangZhuPoker,
                                                    int mLevelPokerNum,
                                                    int masterPokerType)
    {
        List <PokerInfo> pokerInfos   = new List <PokerInfo>();
        List <PokerInfo> jiPaiAndWang = PlayRuleUtil.GetJiPaiAndWang(handerPoker, mLevelPokerNum);

        if (jiPaiAndWang.Count == 0)
        {
            return(pokerInfos);
        }

        //第一次亮主
        if (liangZhuPoker == null || liangZhuPoker.Count == 0)
        {
            for (int i = 0; i < handerPoker.Count; i++)
            {
                if (handerPoker[i].m_num == mLevelPokerNum)
                {
                    pokerInfos.Add(handerPoker[i]);
                }
            }
            List <PokerInfo> doublePoker = PlayRuleUtil.GetDoublePoker(jiPaiAndWang);
            //大小王
            foreach (var poker in doublePoker)
            {
                if (poker.m_pokerType == Consts.PokerType.PokerType_Wang)
                {
                    pokerInfos.Add(poker);
                }
            }
            return(pokerInfos);
        }
        else if (liangZhuPoker.Count == 1)
        {
            List <PokerInfo> doublePoker = PlayRuleUtil.GetDoublePoker(jiPaiAndWang);
            return(doublePoker);
        }
        else if (liangZhuPoker.Count == 2)
        {
            Consts.PokerType mPokerType  = liangZhuPoker[0].m_pokerType;
            List <PokerInfo> doublePoker = PlayRuleUtil.GetDoublePoker(jiPaiAndWang);
            for (int i = 0; i < doublePoker.Count - 1; i += 2)
            {
                if (doublePoker[i].m_pokerType > mPokerType)
                {
                    pokerInfos.Add(doublePoker[i]);
                    pokerInfos.Add(doublePoker[i + 1]);
                }

                if (liangZhuPoker[0].m_num == 15 && doublePoker[i].m_num == 16)
                {
                    pokerInfos.Add(doublePoker[i]);
                    pokerInfos.Add(doublePoker[i + 1]);
                    //                    ToastScript.createToast("dawang");
                }
            }
            return(pokerInfos);
        }
        else
        {
            return(pokerInfos);
        }
    }