public StationaryGenerator(GBASlot slot, IIVsGenerator generateMethod = null) { if (slot == null) { throw new ArgumentException("slotをnullにするな"); } lvGenerator = StandardLvGenerator.GetInstance(); natureGenerator = NullNatureGenerator.GetInstance(); genderGenerator = NullGenderGenerator.GetInstance(); ivsGenrator = generateMethod ?? StandardIVsGenerator.GetInstance(); }
public GBASlot GenerateSlot(ref uint seed) { GBASlot slot = null; foreach (var generator in slotGenerators) { if (generator.TryGenerate(ref seed, out slot)) { break; } } return(slot); }