Ejemplo n.º 1
0
    public void RemoveAllFailures()
    {
        List <Die> dice = new List <Die>(DiceList);

        foreach (Die die in dice)
        {
            if ((die.Side == DieSide.Blank) || (die.Side == DieSide.Focus))
            {
                DiceList.Remove(die);
            }
        }
    }
Ejemplo n.º 2
0
    public void RemoveAllFailures()
    {
        List <Die> diceCopy = new List <Die>(DiceList);

        foreach (Die die in diceCopy)
        {
            if (die.IsFailure)
            {
                DiceList.Remove(die);
            }
        }
    }
Ejemplo n.º 3
0
    public void RemoveAllFailures()
    {
        List <Dice> dices = new List <Dice>();

        dices.AddRange(DiceList);

        foreach (Dice dice in dices)
        {
            if ((dice.Side == DiceSide.Blank) || (dice.Side == DiceSide.Focus))
            {
                DiceList.Remove(dice);
            }
        }
    }
Ejemplo n.º 4
0
    public bool RemoveType(DieSide type)
    {
        // Select a die that matches the type, prioritize those that aren't uncancellable
        Die dieToCancel = DiceList
                          .OrderBy(d => d.IsUncancelable)
                          .FirstOrDefault(d => d.Side == type);

        if (dieToCancel != null)
        {
            dieToCancel.Cancel();
            dieToCancel.RemoveModel();
            DiceList.Remove(dieToCancel);
            return(true);
        }
        else
        {
            return(false);
        }
    }