public static MegaCorp GenerateMegaCorp(int depth = 0, int width = 0) { int ratio = depth; int size = 1; MegaCorp megaCorp = new MegaCorp(); ISet <FatCat> parents = new HashSet <FatCat>(); parents.Add(null); while (depth > 0) { if (depth > 1) { parents.UnionWith(CapitalistGenerator.GenerateFatCats(size, parents)); } else { foreach (ICapitalist capitalist in CapitalistGenerator.GenerateCapitalists(size, parents)) { megaCorp.Add(capitalist); } } size *= ratio; depth--; } return(megaCorp); }
public static IEnumerable <object[]> GenerateWageSlaveNameAndSalaryAndParent() { List <object[]> list = new List <object[]> { new object[] { CapitalistGenerator.GenerateWageSlaveName(), CapitalistGenerator.GenerateSalary(), CapitalistGenerator.GenerateFatCat() } }; return(list); }
public static IEnumerable <object[]> GenerateMegaCorpAndFatCatAndCapitalists() { List <object[]> list = new List <object[]> { new object[] { MegaCorpGenerator.GenerateMegaCorp(), CapitalistGenerator.GenerateFatCat(), CapitalistGenerator.GenerateCapitalists(GenerateSemiRandomSize()) } }; return(list); }
public static IEnumerable <object[]> GenerateMegaCorpAndFatCat(int fatCatDepth) { fatCatDepth = fatCatDepth >= 0 ? fatCatDepth : GenerateSemiRandomSize(); List <object[]> list = new List <object[]> { new object[] { MegaCorpGenerator.GenerateMegaCorp(), CapitalistGenerator.GenerateFatCatAtDepth(fatCatDepth) } }; return(list); }
public static IEnumerable <object[]> GenerateMegaCorpAndWageSlave(int wageSlaveDepth) { wageSlaveDepth = wageSlaveDepth >= 0 ? wageSlaveDepth : GenerateSemiRandomSize(); List <object[]> list = new List <object[]> { new object[] { MegaCorpGenerator.GenerateMegaCorp(), CapitalistGenerator.GenerateWageSlaveAtDepth(wageSlaveDepth) } }; return(list); }
public static IEnumerable <object[]> GenerateMegaCorpAndCapitalists(int capitalistDepth) { capitalistDepth = capitalistDepth >= 0 ? capitalistDepth : GenerateSemiRandomSize(); List <object[]> list = new List <object[]> { new object[] { MegaCorpGenerator.GenerateMegaCorp(), CapitalistGenerator.GenerateCapitalistsAtDepth(GenerateSemiRandomSize(), capitalistDepth) } }; return(list); }