Ejemplo n.º 1
0
    public override void startTableOk(int[] cardHand, Message msg, string[] nickPlay)
    {
        base.startTableOk(cardHand, msg, nickPlay);
        tongMoney = 0;
        players[0].setCardHand(new int[] { cardHand[0], cardHand[1] }, true, false, false);
        if (players[0].isPlaying())
        {
            players[0].setLoaiBai(PokerCard.getTypeOfCardsPoker(players[0].cardHand.getArrCardAll()));
        }
        players[0].cardHand.getCardbyPos(0).setMo(true);
        players[0].cardHand.getCardbyPos(1).setMo(true);
        for (int i = 0; i < players.Length; i++)
        {
            if (players[i].isPlaying())
            {
                players[i].setMoneyChip(BaseInfo.gI().betMoney);
                if (i != 0)
                {
                    players[i].setCardHand(new int[] { 52, 52 }, true, false, false);
                }
                players[i].chipBay.onMoveto(players[i].getMoneyChip(), 1);
                tongMoney += players[i].getMoneyChip();
            }
        }

        chip_tong.setMoneyChipChu(tongMoney);
    }
Ejemplo n.º 2
0
    internal override void StartTableOk(int[] cardHand, Message msg, string[] nickPlay)
    {
        base.StartTableOk(cardHand, msg, nickPlay);
        for (int i = 0; i < ListPlayer.Count; i++)
        {
            ((LiengPlayer)ListPlayer[i]).MoneyChip = 0;
        }
        groupMoneyTo.OnHide();
        MinToMoney = GameConfig.BetMoney * 2;
        MaxToMoney = ClientConfig.UserInfo.CASH_FREE - MinToMoney;

        SumChipControl.MoneyChip = 0;
        tongMoney = 0;

        //Debug.LogError("Card Hand   " + cardHand.Length);
        int[] ccc = new int[2];
        int   ii  = 0;

        for (int i = 0; i < cardHand.Length; i++)
        {
            //Debug.LogError("Card Hand  i " + cardHand[i]);
            if (cardHand[i] >= 0 && cardHand[i] < 52)
            {
                ccc[ii] = cardHand[i];
                ii++;
            }
        }
        list_my_card.Clear();
        list_my_card.AddRange(ccc);
        for (int i = 0; i < ListPlayer.Count; i++)
        {
            LiengPlayer player = (LiengPlayer)ListPlayer[i];
            if (player != null)
            {
                player.MoneyChip = GameConfig.BetMoney;
                player.MoveChip(GameConfig.BetMoney, SumChipControl.transform.position);
                if (player.SitOnClient == 0)
                {
                    player.CardHand.SetAllDark(true);
                    //player.SetTypeCard(PokerCard.getTypeOfCardsPoker(list_my_card.ToArray()));
                    //player.SetTypeCard(
                    TYPE_CARD type  = TypeCardMauBinh.GetTypeCardMauBinh(list_my_card.ToArray());
                    int       type2 = PokerCard.getTypeOfCardsPoker(list_my_card.ToArray());

                    //Debug.LogError("11111111111Type card:  " + type);
                    //Debug.LogError("22222222222Type card:  " + type2);

                    player.CardHand.ChiaBaiTienLen(ccc, true);
                    player.CardHand.SetTouchCardHand(true);
                }
                else
                {
                    player.CardHand.ChiaBaiTienLen(new int[] { 52, 52 }, true);
                }
            }
            tongMoney += GameConfig.BetMoney;
        }
        SumChipControl.OnShow();
        SumChipControl.MoneyChip = tongMoney;
    }
Ejemplo n.º 3
0
    internal void OnInfo(Message msg)
    {
        try {
            string nicksb     = msg.reader().ReadUTF();
            string nickbb     = msg.reader().ReadUTF();
            long   moneyInPot = msg.reader().ReadLong();
            if (((LiengPlayer)playerMe).IsPlaying)
            {
                //players[0].setLoaiBai(PokerCard.getTypeOfCardsPoker(PokerCard.add2ArrayCard(
                //		players[0].cardHand.getArrCardAll(), cardTable.getArrCardAll())));
                int type = PokerCard.getTypeOfCardsPoker(PokerCard.add2ArrayCard(list_my_card.ToArray(), cardTableManager.list_card.ToArray()));
                ((LiengPlayer)playerMe).SetTypeCard(type);
            }
            Debug.LogError("nicksb " + nicksb
                           + "\nnickbb " + nickbb
                           + "\nmoneyInPot " + moneyInPot);
            LiengPlayer plbb = (LiengPlayer)GetPlayerWithName(nickbb);
            LiengPlayer plsb = (LiengPlayer)GetPlayerWithName(nicksb);
            if (plbb != null)
            {
                plbb.MoneyChip = moneyInPot * 2 / 3;
                plbb.MoveChip(moneyInPot * 2 / 3, SumChipControl.transform.position);
            }
            if (plsb != null)
            {
                plsb.MoneyChip = moneyInPot / 3;
                plsb.MoveChip(moneyInPot / 3, SumChipControl.transform.position);
            }

            tongMoney = 0;
            for (int i = 0; i < ListPlayer.Count; i++)
            {
                if (ListPlayer[i].IsPlaying)
                {
                    tongMoney += ((LiengPlayer)ListPlayer[i]).MoneyChip;
                }
            }
            //for (int i = 0; i < nUsers; i++) {
            //	if (players[i].isPlaying()) {
            //		tongMoney = tongMoney + players[i].getMoneyChip();

            //	}
            //}
            //chip_tong.setMoneyChip(tongMoney);
            //chip_tong.setVisible(true);

            SumChipControl.MoneyChip = tongMoney;
        } catch (Exception ex) {
            Debug.LogException(ex);
        }
    }
Ejemplo n.º 4
0
    public override void onAddCardTbl(Message message)
    {
        base.onAddCardTbl(message);
        try {
            // byte type = message.reader().readByte();
            int   size = message.reader().ReadInt();
            int[] card = new int[size];
            for (int i = 0; i < size; i++)
            {
                card[i] = message.reader().ReadByte();
            }
            if (size >= 3)
            {
                flyMoney(0, 1);
            }
            //SoundManager.Get().startAudio(SoundManager.AUDIO_TYPE.CHIABAI);
            //gameControl.sound.startchiabaiAudio();
            SoundManager.instance.startchiabaiAudio();
            if (size == 3)
            {
                cardTable.setArrCard(card, false, false, false, -1);
                for (int i = 0; i < cardTable.getSize(); i++)
                {
                    cardTable.getCardbyPos(i).GetComponent <RectTransform>().sizeDelta = new Vector3(80, 110);
                    onMoCard(cardTable.getCardbyPos(i),
                             cardTable.getCardbyPos(i).getId());
                }
            }
            else
            {
                for (int i = cardTable.getSize(); i < size; i++)
                {
                    cardTable.getCardbyPos(i).GetComponent <RectTransform>().sizeDelta = new Vector3(80, 110);
                    cardTable.addCard(card[i]);
                    onMoCard(cardTable.getCardbyPos(i),
                             cardTable.getCardbyPos(i).getId());
                }
            }

            if (players[0].isPlaying() && players[0].getName().Equals(BaseInfo.gI().mainInfo.nick))
            {
                players[0].setLoaiBai(PokerCard.getTypeOfCardsPoker(PokerCard
                                                                    .add2ArrayCard(players[0].cardHand.getArrCardAll(),
                                                                                   cardTable.getArrCardAll())));
            }
        } catch (Exception ex) {
            Debug.LogException(ex);
        }
    }
Ejemplo n.º 5
0
    public void HasDrop()
    {
        if (gameControl.isTouchMB)
        {
            int[] c2        = players[0].cardMauBinh[2].getArrayCardAllTrue();
            int[] c1        = players[0].cardMauBinh[1].getArrayCardAllTrue();
            int[] c0        = players[0].cardMauBinh[0].getArrayCardAllTrue();
            int   typecard1 = PokerCard.getTypeOfCardsPoker(c2);
            int   typecard2 = PokerCard.getTypeOfCardsPoker(c1);
            int   typecard3 = PokerCard.getTypeOfCardsPoker(c0);

            setLoaiBai(1, typecard1);
            setLoaiBai(2, typecard2);
            setLoaiBai(3, typecard3);

            checkLung(c2, c1, c0);
            card_show_mb.gameObject.SetActive(false);
        }
    }
Ejemplo n.º 6
0
 public override void onInfo(Message msg)
 {
     base.onInfo(msg);
     try {
         String nicksb     = msg.reader().ReadUTF();
         String nickbb     = msg.reader().ReadUTF();
         long   moneyInPot = msg.reader().ReadLong();
         // byte type = msg.reader().readByte();
         if (players[0].isPlaying() && players[0].getName().Equals(BaseInfo.gI().mainInfo.nick))
         {
             players[0].setLoaiBai(PokerCard.getTypeOfCardsPoker(PokerCard
                                                                 .add2ArrayCard(players[0].cardHand.getArrCardAll(),
                                                                                cardTable.getArrCardAll())));
         }
         players[getPlayer(nickbb)].setMoneyChip(moneyInPot * 2 / 3);
         players[getPlayer(nicksb)].setMoneyChip(moneyInPot / 3);
     } catch (Exception ex) {
         Debug.LogException(ex);
     }
 }
Ejemplo n.º 7
0
    public void OnAddCardTbl(Message message)
    {
        try {
            // byte type = message.reader().readByte();
            int   size  = message.reader().ReadInt();
            int[] cards = new int[size];
            for (int i = 0; i < size; i++)
            {
                cards[i] = message.reader().ReadByte();
            }

            cardTableManager.AddCard(cards);

            if (((LiengPlayer)playerMe).IsPlaying)
            {
                int type = PokerCard.getTypeOfCardsPoker(PokerCard.add2ArrayCard(list_my_card.ToArray(), cardTableManager.list_card.ToArray()));
                ((LiengPlayer)playerMe).SetTypeCard(type);
            }
        } catch (Exception ex) {
            Debug.LogException(ex);
        }
    }
Ejemplo n.º 8
0
    public override void onGetCardNoc(string nick, int card)
    {
        base.onGetCardNoc(nick, card);
        //checkFly
        //flyMoney();
        int idpl = getPlayer(nick);

        if (idpl != -1)
        {
            if (players[idpl].cardHand.getCardbyPos(0).getId() == 52 &&
                players[idpl].cardHand.getCardbyPos(1).getId() == 52)
            {
                players[idpl].setCardHand(new int[] { 52, card }, false, false, false);
            }
            else
            {
                if (players[idpl].getName().Equals(BaseInfo.gI().mainInfo.nick))
                {
                    players[idpl].addToCardHand(card, true);
                }
                else
                {
                    players[idpl].addToCardHand(card, false);
                }
            }
        }

        if (idpl == 0)
        {
            if (players[0].isPlaying() && players[0].getName().Equals(BaseInfo.gI().mainInfo.nick))
            {
                players[0].setLoaiBai(PokerCard
                                      .getTypeOfCardsPoker(players[0].cardHand
                                                           .getArrCardAll()));
            }
        }
    }
Ejemplo n.º 9
0
    public override void startTableOk(int[] cardHand, Message msg, string[] nickPlay)
    {
        base.startTableOk(cardHand, msg, nickPlay);
        players[0].setCardHand(new int[] { cardHand[0], cardHand[1] }, true, false, false);
        if (players[0].isPlaying() && players[0].getName().Equals(BaseInfo.gI().mainInfo.nick))
        {
            players[0].setLoaiBai(PokerCard
                                  .getTypeOfCardsPoker(players[0].cardHand.getArrCardAll()));
        }
        players[0].cardHand.getCardbyPos(0).setMo(true);
        players[0].cardHand.getCardbyPos(1).setMo(true);

        for (int i = 0; i < players.Length; i++)
        {
            if (players[i].isPlaying() && !players[i].getName().Equals(""))
            {
                players[i].setMoneyChip(BaseInfo.gI().moneyTable);
                if (i != 0)
                {
                    players[i].setCardHand(new int[] { 52, 52 }, true, false, false);
                }
            }
        }
    }
Ejemplo n.º 10
0
    public void click()
    {
        if (!mbStage.isTouchCard)
        {
            return;
        }
        if (card.cardMo.gameObject.activeInHierarchy)
        {
            card.cardMo.gameObject.SetActive(false);
            return;
        }

        card.cardMo.gameObject.SetActive(true);
        GameControl.instance.sound.startchiabaiAudio();
        Card c1 = null, c2 = null;
        int  dem = 0;

        for (int i = 0; i < cardChi[0].getSize(); i++)
        {
            if (cardChi[0].getCardbyPos(i).cardMo.gameObject.activeInHierarchy)
            {
                dem++;
                if (dem == 1)
                {
                    c1 = cardChi[0].getCardbyPos(i);
                }
                else if (dem == 2)
                {
                    c2 = cardChi[0].getCardbyPos(i);
                }
            }
        }
        for (int i = 0; i < cardChi[1].getSize(); i++)
        {
            if (cardChi[1].getCardbyPos(i).cardMo.gameObject.activeInHierarchy)
            {
                dem++;
                if (dem == 1)
                {
                    c1 = cardChi[1].getCardbyPos(i);
                }
                else if (dem == 2)
                {
                    c2 = cardChi[1].getCardbyPos(i);
                }
            }
        }
        for (int i = 0; i < cardChi[2].getSize(); i++)
        {
            if (cardChi[2].getCardbyPos(i).cardMo.gameObject.activeInHierarchy)
            {
                dem++;
                if (dem == 1)
                {
                    c1 = cardChi[2].getCardbyPos(i);
                }
                else if (dem == 2)
                {
                    c2 = cardChi[2].getCardbyPos(i);
                }
            }
        }

        if (dem == 2)
        {
            int temp = c1.getId();
            if (c1.getId() != c2.getId())
            {
                c1.setId(c2.getId());
                c2.setId(temp);
            }
            changeMain();
            change(0);
            change(1);
            change(2);

            int typecard1 = PokerCard.getTypeOfCardsPoker(cardChi[2].getArrayCardAllTrue());
            int typecard2 = PokerCard.getTypeOfCardsPoker(cardChi[1].getArrayCardAllTrue());
            int typecard3 = PokerCard.getTypeOfCardsPoker(cardChi[0].getArrayCardAllTrue());

            mbStage.setLoaiBai(1, typecard1);
            mbStage.setLoaiBai(2, typecard2);
            mbStage.setLoaiBai(3, typecard3);

            mbStage.checkLung(cardChi[2].getArrayCardAllTrue(), cardChi[1].getArrayCardAllTrue(), cardChi[0].getArrayCardAllTrue());
        }
    }
Ejemplo n.º 11
0
    IEnumerator setCardHand(int[] cardHand, int pos, bool isDearling)
    {
        players[pos].cardMauBinh[0].setArrCard(new int[] { });
        players[pos].cardMauBinh[1].setArrCard(new int[] { });
        players[pos].cardMauBinh[2].setArrCard(new int[] { });

        int[] cardChi1 = new int[] { cardHand[0], cardHand[1], cardHand[2], cardHand[3], cardHand[4] };
        int[] cardChi2 = new int[] { cardHand[5], cardHand[6], cardHand[7], cardHand[8], cardHand[9] };
        int[] cardChi3 = new int[] { cardHand[10], cardHand[11], cardHand[12] };

        bool isFlip;

        if (isDearling)
        {
            isFlip = true;
        }
        else
        {
            isFlip = false;
        }
        float timeDelay = 0.5f;

        if (pos == 0 && players[pos].isPlaying())
        {
            players[pos].cardMauBinh[2].setArrCard(cardChi1,
                                                   isDearling, false, isFlip);
            setLoaiBai(1, PokerCard.getTypeOfCardsPoker(cardChi1));
        }
        else
        {
            players[pos].cardMauBinh[2].setArrCard(cardChi1,
                                                   isDearling, false, false);
        }
        yield return(new WaitForSeconds(timeDelay));

        if (pos == 0 && players[pos].isPlaying())
        {
            players[pos].cardMauBinh[1].setArrCard(cardChi2,
                                                   isDearling, false, isFlip);
            setLoaiBai(2, PokerCard.getTypeOfCardsPoker(cardChi2));
        }
        else
        {
            players[pos].cardMauBinh[1].setArrCard(cardChi2,
                                                   isDearling, false, false);
        }

        yield return(new WaitForSeconds(timeDelay));

        if (pos == 0 && players[pos].isPlaying())
        {
            players[pos].cardMauBinh[0].setArrCard(cardChi3,
                                                   isDearling, false, isFlip);
            setLoaiBai(3, PokerCard.getTypeOfCardsPoker(cardChi3));
            checkLung(cardChi1, cardChi2, cardChi3);
        }
        else
        {
            players[pos].cardMauBinh[0].setArrCard(cardChi3,
                                                   isDearling, false, false);
        }

        if (!isDearling)
        {
            timeDelay = 0;
        }

        /* if(players[0].getName ().Equals (BaseInfo.gI ().mainInfo.nick)) {
         *    if(infome) {
         *        btn_xong.setVisible (true);
         *    } else
         *        btn_xong.setVisible (isDearling);
         * } else {
         *    btn_xong.setVisible (false);
         * }*
         * }*/
    }
Ejemplo n.º 12
0
    public override void onRankMauBinh(sbyte chi, string namePlayer, sbyte typeCard,
                                       long moneyEarn, int[] cardChi)
    {
        base.onRankMauBinh(chi, namePlayer, typeCard, moneyEarn, cardChi);

        btn_xong.gameObject.SetActive(false);
        btn_xeplai.gameObject.SetActive(false);
        lb_time_mb.gameObject.SetActive(false);
        for (int i = 0; i < players.Length; i++)
        {
            players[i].sp_xepXong.gameObject.SetActive(false);
        }
        go_chi.SetActive(false);

        if (!BaseInfo.gI().isView&& players[0].isPlaying())
        {
            sp_chi.gameObject.SetActive(true);
            sp_chi.spriteName = "chi" + (chi);
            sp_chi.transform.localPosition = new Vector3(-300, -175, 0);
            TweenPosition.Begin(sp_chi.gameObject, 2.0f, new Vector3(-300f, -75f, 0f));
        }

        int iCard = 0;

        if (chi == 1)
        {
            iCard = 2;
        }
        else if (chi == 2)
        {
            iCard = 1;
        }
        else if (chi == 3)
        {
            iCard = 0;
        }

        int index = getPlayer(namePlayer);

        if (index != 0)
        {
            players[getPlayer(namePlayer)].cardMauBinh[iCard]
            .setArrCard(cardChi);
        }
        else if (!players[0].getName().Equals(BaseInfo.gI().mainInfo.nick))
        {
            players[getPlayer(namePlayer)].cardMauBinh[iCard]
            .setArrCard(cardChi);
        }

        switch (index)
        {
        case 0: {
            //if(!BaseInfo.gI ().isView && players[0].isPlaying ()) {//neu dang choi

            gameControl.sound.startSobaiAudio();

            players[0].sp_typeCard.gameObject.SetActive(true);
            players[0].sp_typeCard.transform.localScale = new Vector3(0, 0, 0);
            TweenScale.Begin(players[0].sp_typeCard.gameObject, 0.2f, new Vector3(1.4f, 1.4f, 1.4f));
            StartCoroutine(setInvisible(players[0].sp_typeCard.gameObject));
            Vector3 vt = players[0].sp_typeCard.transform.localPosition;
            switch (chi)
            {
            case 1: {
                for (int i = 0; i < players[0].cardMauBinh[0].getSize(); i++)
                {
                    players[0].cardMauBinh[0].getCardbyPos(i).cardMo.gameObject.SetActive(true);
                    players[0].cardMauBinh[0].getCardbyPos(i).transform.localScale = new Vector3(1, 1, 1);
                }
                for (int i = 0; i < players[0].cardMauBinh[1].getSize(); i++)
                {
                    players[0].cardMauBinh[1].getCardbyPos(i).cardMo.gameObject.SetActive(true);
                    players[0].cardMauBinh[1].getCardbyPos(i).transform.localScale = new Vector3(1, 1, 1);
                }
                for (int i = 0; i < players[0].cardMauBinh[2].getSize(); i++)
                {
                    players[0].cardMauBinh[2].getCardbyPos(i).cardMo.gameObject.SetActive(false);
                    players[0].cardMauBinh[2].getCardbyPos(i).transform.localScale = new Vector3(1.2f, 1.2f, 1.2f);
                }

                players[0].sp_typeCard.spriteName = Res.TypeCard_Name[PokerCard.getTypeOfCardsPoker(players[0].cardMauBinh[2].getArrayCardAllTrue())];
                vt.y = players[0].cardMauBinh[2].transform.localPosition.y;
                break;
            }

            case 2: {
                for (int i = 0; i < players[0].cardMauBinh[0].getSize(); i++)
                {
                    players[0].cardMauBinh[0].getCardbyPos(i).cardMo.gameObject.SetActive(true);
                    players[0].cardMauBinh[0].getCardbyPos(i).transform.localScale = new Vector3(1, 1, 1);
                }
                for (int i = 0; i < players[0].cardMauBinh[1].getSize(); i++)
                {
                    players[0].cardMauBinh[1].getCardbyPos(i).cardMo.gameObject.SetActive(false);
                    players[0].cardMauBinh[1].getCardbyPos(i).transform.localScale = new Vector3(1.2f, 1.2f, 1.2f);
                }
                for (int i = 0; i < players[0].cardMauBinh[2].getSize(); i++)
                {
                    players[0].cardMauBinh[2].getCardbyPos(i).cardMo.gameObject.SetActive(true);
                    players[0].cardMauBinh[2].getCardbyPos(i).transform.localScale = new Vector3(1, 1, 1);
                }
                players[0].sp_typeCard.spriteName = Res.TypeCard_Name[PokerCard.getTypeOfCardsPoker(players[0].cardMauBinh[1].getArrayCardAllTrue())];
                vt.y = players[0].cardMauBinh[1].transform.localPosition.y;
                break;
            }

            case 3: {
                for (int i = 0; i < players[0].cardMauBinh[0].getSize(); i++)
                {
                    players[0].cardMauBinh[0].getCardbyPos(i).cardMo.gameObject.SetActive(false);
                    players[0].cardMauBinh[0].getCardbyPos(i).transform.localScale = new Vector3(1.2f, 1.2f, 1.2f);
                }
                for (int i = 0; i < players[0].cardMauBinh[1].getSize(); i++)
                {
                    players[0].cardMauBinh[1].getCardbyPos(i).cardMo.gameObject.SetActive(true);
                    players[0].cardMauBinh[1].getCardbyPos(i).transform.localScale = new Vector3(1, 1, 1);
                }
                for (int i = 0; i < players[0].cardMauBinh[2].getSize(); i++)
                {
                    players[0].cardMauBinh[2].getCardbyPos(i).cardMo.gameObject.SetActive(true);
                    players[0].cardMauBinh[2].getCardbyPos(i).transform.localScale = new Vector3(1, 1, 1);
                }

                players[0].sp_typeCard.spriteName = Res.TypeCard_Name[PokerCard.getTypeOfCardsPoker(players[0].cardMauBinh[0].getArrayCardAllTrue())];
                vt.y = players[0].cardMauBinh[0].transform.localPosition.y;
                break;
            }
            }
            players[0].sp_typeCard.transform.localPosition = vt;
            players[0].setMoneyMB(moneyEarn);

            /*} else { //Neu la xem
             *  for(int i = 0; i < players[0].cardMauBinh[0].getSize (); i++) {
             *      players[0].cardMauBinh[0].getCardbyPos (i).gameObject.SetActive (false);
             *  }
             *  for(int i = 0; i < players[0].cardMauBinh[1].getSize (); i++) {
             *      players[0].cardMauBinh[1].getCardbyPos (i).gameObject.SetActive (false);
             *  }
             *  for(int i = 0; i < players[0].cardMauBinh[2].getSize (); i++) {
             *      players[0].cardMauBinh[2].getCardbyPos (i).gameObject.SetActive (false);
             *  }
             * }*/
            break;
        }

        default: {
            players[index].sp_typeCard.gameObject.SetActive(true);
            players[index].sp_typeCard.transform.localScale = new Vector3(0, 0, 0);
            TweenScale.Begin(players[index].sp_typeCard.gameObject, 0.2f, new Vector3(1.4f, 1.4f, 1.4f));
            // StopAllCoroutines ();
            StartCoroutine(setInvisible(players[index].sp_typeCard.gameObject));
            switch (chi)
            {
            case 1: {
                for (int i = 0; i < players[index].cardMauBinh[2].getSize(); i++)
                {
                    players[index].cardMauBinh[2].getCardbyPos(i).cardMo.gameObject.SetActive(false);
                    players[index].cardMauBinh[2].getCardbyPos(i).setId(cardChi[i]);
                }

                players[index].sp_typeCard.spriteName = Res.TypeCard_Name[PokerCard.getTypeOfCardsPoker(players[index].cardMauBinh[2].getArrayCardAllTrue())];
                players[index].sp_typeCard.transform.localPosition = players[index].cardMauBinh[2].transform.localPosition;
                break;
            }

            case 2: {
                for (int i = 0; i < players[index].cardMauBinh[1].getSize(); i++)
                {
                    players[index].cardMauBinh[1].getCardbyPos(i).cardMo.gameObject.SetActive(false);
                    players[index].cardMauBinh[1].getCardbyPos(i).setId(cardChi[i]);
                }
                players[index].sp_typeCard.spriteName = Res.TypeCard_Name[PokerCard.getTypeOfCardsPoker(players[index].cardMauBinh[1].getArrayCardAllTrue())];

                players[index].sp_typeCard.transform.localPosition = players[index].cardMauBinh[1].transform.localPosition;
                break;
            }

            case 3: {
                for (int i = 0; i < players[index].cardMauBinh[0].getSize(); i++)
                {
                    players[index].cardMauBinh[0].getCardbyPos(i).cardMo.gameObject.SetActive(false);
                    players[index].cardMauBinh[0].getCardbyPos(i).setId(cardChi[i]);
                }
                players[index].sp_typeCard.spriteName = Res.TypeCard_Name[PokerCard.getTypeOfCardsPoker(players[index].cardMauBinh[0].getArrayCardAllTrue())];
                players[index].sp_typeCard.transform.localPosition = players[index].cardMauBinh[0].transform.localPosition;
                break;
            }
            }
            players[index].setMoneyMB(moneyEarn);
            break;
        }
        }
    }