protected override void LoadBuilder() { var sequence = new DeckBuilderSequence <TCard>(); FillSequence(sequence); LoadSequence(sequence); }
public void LoadSequence(DeckBuilderSequence <TCard> sequence) { if (!sequence.Valid) { throw new IllegalDeckBuilderSequenceException(); } Clear(); AddCards(sequence.Cards); }
public static DeckBuilderSequence <TCard> AddColors <TCard>(this DeckBuilderSequence <TCard> sequence, int num) where TCard : ICard, ICopySource <TCard>, new() { sequence.AddGroup(new ColorGroup <TCard>(num)); return(sequence); }
public static DeckBuilderSequence <TCard> AddNumbers <TCard>(this DeckBuilderSequence <TCard> sequence, int min, int max) where TCard : ICard, ICopySource <TCard>, new() { sequence.AddGroup(new NumberGroup <TCard>(min, max)); return(sequence); }
protected virtual void FillSequence(DeckBuilderSequence <TCard> sequence) { }
public CustomDeckBuilder(DeckBuilderSequence <TCard> sequence) { LoadSequence(sequence); }