public static OneOfEachUnlockedCardInClassDeckBuilder Create(Classes classe) { Card[] allCardsOfClass = ClassInfo.GetCardsOfClass(classe); Card[] unlockedPrototypes = CardsCollection.GetUnlockedCardsFrom(allCardsOfClass); OneOfEachUnlockedCardInClassDeckBuilder builder = new OneOfEachUnlockedCardInClassDeckBuilder(unlockedPrototypes.Length); builder.unlockedCardPrototypes = unlockedPrototypes; return(builder); }
private void PopulateArrayOfAllCardPrototypes() { Classes[] classes = (Classes[])System.Enum.GetValues(typeof(Classes)); List <Card> allCardPrototypesList = new List <Card>(); // Starts at 1 so it won't take the Classes.NOT_A_CLASS key for (int i = 1; i < classes.Length; i++) { Card[] cardsOfClass = ClassInfo.GetCardsOfClass(classes[i]); allCardPrototypesList.AddRange(cardsOfClass); } allCardPrototypes = allCardPrototypesList.ToArray(); }