diff --git a/Lottery/Generator.cs b/Lottery/Generator.cs index 4ae7895..25c4fcf 100644 --- a/Lottery/Generator.cs +++ b/Lottery/Generator.cs @@ -23,6 +23,14 @@ } NumberList.Sort(); } + + protected static void FillNumbers( + List NormalList, Limits NormalLimits, + List SpecialList, Limits SpecialLimits) + { + FillNumbers(NormalList, NormalLimits); + FillNumbers(SpecialList, SpecialLimits); + } } /// @@ -53,8 +61,7 @@ public override Numbers Generate() { NumbersWithSpecial Numbers = new(KindOfLottery.Euro, [], []); - Generator.FillNumbers(Numbers.Normal, NormalLimits); - Generator.FillNumbers(Numbers.Special, SpecialLimits); + Generator.FillNumbers(Numbers.Normal, NormalLimits, Numbers.Special, SpecialLimits); return Numbers; } } @@ -71,8 +78,7 @@ public override Numbers Generate() { NumbersWithSpecial Numbers = new(KindOfLottery.SetForLife, [], []); - Generator.FillNumbers(Numbers.Normal, NormalLimits); - Generator.FillNumbers(Numbers.Special, SpecialLimits); + Generator.FillNumbers(Numbers.Normal, NormalLimits, Numbers.Special, SpecialLimits); return Numbers; } } @@ -89,8 +95,7 @@ public override Numbers Generate() { NumbersWithSpecial Numbers = new(KindOfLottery.Thunderball, [], []); - Generator.FillNumbers(Numbers.Normal, NormalLimits); - Generator.FillNumbers(Numbers.Special, SpecialLimits); + Generator.FillNumbers(Numbers.Normal, NormalLimits, Numbers.Special, SpecialLimits); return Numbers; } }