Esempio n. 1
0
    public byte get_same_number_card_count(byte number)
    {
        CFloorSlot slot = find_slot(number);

        if (slot == null)
        {
            return(0);
        }
        return((byte)slot.cards.Count);
    }
Esempio n. 2
0
    public CCard get_first_card(byte number)
    {
        CFloorSlot slot = find_slot(number);

        if (slot == null)
        {
            return(null);
        }
        return(slot.cards[0]);
    }
Esempio n. 3
0
    public List <CCard> get_cards(byte number)
    {
        CFloorSlot slot = find_slot(number);

        if (slot == null)
        {
            return(null);
        }
        return(slot.cards);
    }
Esempio n. 4
0
    public void remove_card(CCard card)
    {
        CFloorSlot slot = find_slot(card.number);

        if (slot != null)
        {
            slot.remove_card(card);
            //UnityEngine.Debug.Log(string.Format("removed card. {0}, {1}, {2}, remain {3}",
            //	card.number, card.pae_type, card.position,
            //	slot.cards.Count));
        }
    }
Esempio n. 5
0
    // 해당번호와 동일한 위치에 카드를 놓는다.
    public void puton_card(CCard card)
    {
        CFloorSlot slot = find_slot(card.number);

        if (slot == null)
        {
            slot = find_empty_slot();
            slot.add_card(card);
            return;
        }

        this.slots[slot.slot_position].add_card(card);
    }
Esempio n. 6
0
    CFloorSlot find_slot(byte card_number)
    {
        CFloorSlot slot = this.slots.Find(obj => obj.is_same(card_number));

        return(slot);
    }
Esempio n. 7
0
    CFloorSlot find_empty_slot()
    {
        CFloorSlot slot = this.slots.Find(obj => obj.is_empty());

        return(slot);
    }