add overload for FillNumbers

This commit is contained in:
onyx-and-iris 2024-09-27 11:39:36 +01:00
parent 35062e67e2
commit fce71f31a1

View File

@ -23,6 +23,14 @@
} }
NumberList.Sort(); NumberList.Sort();
} }
protected static void FillNumbers(
List<int> NormalList, Limits NormalLimits,
List<int> SpecialList, Limits SpecialLimits)
{
FillNumbers(NormalList, NormalLimits);
FillNumbers(SpecialList, SpecialLimits);
}
} }
/// <summary> /// <summary>
@ -53,8 +61,7 @@
public override Numbers Generate() public override Numbers Generate()
{ {
NumbersWithSpecial Numbers = new(KindOfLottery.Euro, [], []); NumbersWithSpecial Numbers = new(KindOfLottery.Euro, [], []);
Generator.FillNumbers(Numbers.Normal, NormalLimits); Generator.FillNumbers(Numbers.Normal, NormalLimits, Numbers.Special, SpecialLimits);
Generator.FillNumbers(Numbers.Special, SpecialLimits);
return Numbers; return Numbers;
} }
} }
@ -71,8 +78,7 @@
public override Numbers Generate() public override Numbers Generate()
{ {
NumbersWithSpecial Numbers = new(KindOfLottery.SetForLife, [], []); NumbersWithSpecial Numbers = new(KindOfLottery.SetForLife, [], []);
Generator.FillNumbers(Numbers.Normal, NormalLimits); Generator.FillNumbers(Numbers.Normal, NormalLimits, Numbers.Special, SpecialLimits);
Generator.FillNumbers(Numbers.Special, SpecialLimits);
return Numbers; return Numbers;
} }
} }
@ -89,8 +95,7 @@
public override Numbers Generate() public override Numbers Generate()
{ {
NumbersWithSpecial Numbers = new(KindOfLottery.Thunderball, [], []); NumbersWithSpecial Numbers = new(KindOfLottery.Thunderball, [], []);
Generator.FillNumbers(Numbers.Normal, NormalLimits); Generator.FillNumbers(Numbers.Normal, NormalLimits, Numbers.Special, SpecialLimits);
Generator.FillNumbers(Numbers.Special, SpecialLimits);
return Numbers; return Numbers;
} }
} }