示例#1
0
    public void AddUsedCards(List <CardData> cards)
    {
        cards.ForEach(c =>
        {
            var bitCard = CardUtility.ToBitCard(c.Suit, c.Number);

            if ((BitUsedCard & bitCard) != 0)
            {
                throw new Exception("Duplication Error");
            }

            BitUsedCard |= bitCard;
        });
    }
示例#2
0
    public void AddCards(List <CardData> cards)
    {
        cards.ForEach(c =>
        {
            var bitCard = CardUtility.ToBitCard(c.Suit, c.Number);

            if ((BitFieldCard & bitCard) != 0)
            {
                throw new Exception("Duplication Error");
            }

            BitFieldCard |= bitCard;
        });

        viewer.Render(ToCardIDList(BitFieldCard));
    }
示例#3
0
    protected override void Awake()
    {
        base.Awake();

        viewer = GetComponent <HumanCardViewer>();

        viewer.SelectedCardChanged += (s, e) =>
        {
            var viewer = (HumanCardViewer)s;

            BitSelectedHand = CardUtility.ToBitCard(viewer.SelectedCard);

            var isLegal = IsLegalBitCard(gameData.BitFieldCard);

            playButton.gameObject.SetActive(isLegal);
        };
    }