Ejemplo n.º 1
0
    //	========================================================================================
    //	dice stuff

    public int GetNumValidDice(TileAbility.DieType onlyDieType)
    {
        int nDice = 0;

        foreach (PharoahDie die in diceList)
        {
            if (die.isDieType(onlyDieType))
            {
                nDice++;
            }
        }
        return(nDice);
    }
Ejemplo n.º 2
0
    public bool isDieType(TileAbility.DieType onlyDieType)
    {
        bool isOfType = false;

        switch (onlyDieType)
        {
        default:
            break;

        case TileAbility.DieType.Any:
            isOfType = true;
            break;

        case TileAbility.DieType.Active:
            isOfType = this.isActiveDie();
            break;

        case TileAbility.DieType.Immediate:
            isOfType = isImmediateDie();
            break;

        case TileAbility.DieType.Custom:
            isOfType = isCustomDie();
            break;

        case TileAbility.DieType.Standard:
            isOfType = isStandardDie();
            break;

        case TileAbility.DieType.Locked:
            isOfType = isLockedDie();
            break;

        case TileAbility.DieType.ActiveCustomOrImmediate:
            isOfType = (isCustomDie() || isImmediateDie()) && isActiveDie();
            break;
        }
        return(isOfType);
    }