public override InitiativePassSlot Next() { InitiativeOrder.Sort(); var slot = InitiativeOrder.FirstOrDefault(_leftToAct); if (slot != null) { slot.CurrentInitiative -= 10; } return(slot); }
public void Setup(IDiceBag diceBag, IEnumerable <ICharacter> participants) { if (diceBag == null) { throw new ArgumentNullException("diceBag"); } if (participants == null) { throw new ArgumentNullException("participants"); } InitiativeOrder = participants.Select(x => new InitiativePassSlot() { Participant = x, HasActed = false }).ToList(); InitiativeOrder.ForEach(x => x.CurrentInitiative = x.RollInitiative(diceBag)); InitiativeOrder.Sort(); }
public override InitiativePassSlot Next() { InitiativeOrder.Sort(); return(InitiativeOrder.FirstOrDefault(_leftToAct)); }