コード例 #1
0
ファイル: player.cpp プロジェクト: ubun/SakuraSlash
int Player::getCardCount(bool include_equip) const{
    int count = getHandcardNum();

    if(include_equip){
        if(weapon)
            count ++;

        if(armor)
            count ++;

        if(defensive_horse)
            count ++;

        if(offensive_horse)
            count ++;
    }

    return count;
}
コード例 #2
0
ファイル: player.cpp プロジェクト: ubun/SakuraSlash
bool Player::isKongcheng() const{
    return getHandcardNum() == 0;
}
コード例 #3
0
ファイル: player.cpp プロジェクト: KenKic/QSanguosha
bool Player::isNude() const{
    return getHandcardNum() == 0 && getWeapon() == NULL && getArmor() == NULL
            && getDefensiveHorse() == NULL && getOffensiveHorse() == NULL;
}