public async Task ShowRollingAsync(CustomBasicList <CustomBasicList <D> > diceCollection, bool showVisible) { CanShowDice = showVisible; AsyncDelayer.SetDelayer(this, ref _delay !); //because for multiplayer, they do this part but not the other. await diceCollection.ForEachAsync(async firsts => { DiceList.ReplaceDiceRange(firsts); int tempCount = DiceList.Count; if (DiceList.Any(Items => Items.Index > tempCount || Items.Index <= 0)) { throw new BasicBlankException("Index cannot be higher than the dicecount or less than 1"); } HasDice = true; if (CanShowDice == true) { Visible = true; await _delay.DelayMilli(50); } }); }
public void RemoveConditionalDice(Predicate <D> predicate) { DiceList.RemoveConditionalDice(predicate); HowManyDice = DiceList.Count; }
public void ReplaceDiceRange(ICustomBasicList <D> thisList) { DiceList.ReplaceDiceRange(thisList); HowManyDice = DiceList.Count; }
private void RedoList() { DiceList.Clear(HowManyDice); }
public void ClearDice() { HasDice = true; HowManyDice = _originalNumber; DiceList.Clear(HowManyDice); }
public bool HasSelectedDice() => DiceList.Exists(items => items.IsSelected == true);
public void UnholdDice() => DiceList.ForEach(items => items.Hold = false);