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); } } }
public void RemoveAllFailures() { List <Die> diceCopy = new List <Die>(DiceList); foreach (Die die in diceCopy) { if (die.IsFailure) { DiceList.Remove(die); } } }
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); } } }
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); } }