예제 #1
0
void ServerPlayer::addCard(const Card *card, Place place){
    switch(place){
    case Hand: handcards << card; break;
    case Equip: {
            const EquipCard *equip = qobject_cast<const EquipCard *>(card);
            setEquip(equip);
            equip->onInstall(this);
            break;
        }
    case Judging:{
            addDelayedTrick(card);
            break;
        }
    default:
        // FIXME
        ;
    }
}
예제 #2
0
void ClientPlayer::addCard(const Card *card, Place place) {
    switch (place) {
    case PlaceHand: {
            if (card) known_cards << card;
            handcard_num++;
            break;
        }
    case PlaceEquip: {
            WrappedCard *equip = Sanguosha->getWrappedCard(card->getEffectiveId());
            setEquip(equip);
            break;
        }
    case PlaceDelayedTrick: {
            addDelayedTrick(card);
            break;
        }
    default:
            break;
    }
}
예제 #3
0
void ClientPlayer::addCard(const Card *card, Place place){
    switch(place){
    case PlaceHand: {
            if(card)
                known_cards << card;
            handcard_num++;
            break;
        }
    case PlaceEquip: {
            const EquipCard *equip = qobject_cast<const EquipCard*>(card);
            setEquip(equip);
            break;
        }
    case PlaceDelayedTrick:{
            addDelayedTrick(card);
            break;
        }
    default:
        // FIXME
        ;
    }
}