From fce71f31a181975e0b4bcda54031d70e2c75aee6 Mon Sep 17 00:00:00 2001 From: onyx-and-iris Date: Fri, 27 Sep 2024 11:39:36 +0100 Subject: [PATCH] add overload for FillNumbers --- Lottery/Generator.cs | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) 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; } }