mirror of
https://github.com/onyx-and-iris/Lottery.git
synced 2024-11-24 07:00:47 +00:00
rename UKGenerator to UKLottoGenerator
rename EuroGenerator to EuroMillionsGenerator
This commit is contained in:
parent
bd393356a6
commit
f8bc3a7edc
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Abstract base class for generators
|
/// Abstract base class for generators
|
||||||
/// It implements the IGenerator interface
|
/// All subclasses must implement the IGenerator interface
|
||||||
/// Provides some default implementation
|
/// Provides some default implementation
|
||||||
/// </summary>
|
/// </summary>
|
||||||
class Generator : IGenerator
|
class Generator : IGenerator
|
||||||
@ -26,10 +26,10 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Concrete UKGenerator class.
|
/// Concrete UKLottoGenerator class.
|
||||||
/// Generates six balls from 1 to 59
|
/// Generates six balls from 1 to 59
|
||||||
/// </summary>
|
/// </summary>
|
||||||
class UKGenerator : Generator
|
class UKLottoGenerator : Generator
|
||||||
{
|
{
|
||||||
private readonly Limits Limits = new(6, 1, 59);
|
private readonly Limits Limits = new(6, 1, 59);
|
||||||
|
|
||||||
@ -42,10 +42,10 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Concrete EuroGenerator class.
|
/// Concrete EuroMillionsGenerator class.
|
||||||
/// Generates five balls from 1 to 50 and two balls from 1 to 12
|
/// Generates five balls from 1 to 50 and two balls from 1 to 12
|
||||||
/// </summary>
|
/// </summary>
|
||||||
class EuroGenerator : Generator
|
class EuroMillionsGenerator : Generator
|
||||||
{
|
{
|
||||||
private readonly Limits NormalLimits = new(5, 1, 50);
|
private readonly Limits NormalLimits = new(5, 1, 50);
|
||||||
private readonly Limits SpecialLimits = new(2, 1, 12);
|
private readonly Limits SpecialLimits = new(2, 1, 12);
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
public partial class MainPage : ContentPage
|
public partial class MainPage : ContentPage
|
||||||
{
|
{
|
||||||
readonly List<IGenerator> Generators = [new UKGenerator(), new EuroGenerator(), new SetForLifeGenerator(), new ThunderBallGenerator()];
|
readonly List<IGenerator> Generators = [new UKLottoGenerator(), new EuroMillionsGenerator(), new SetForLifeGenerator(), new ThunderBallGenerator()];
|
||||||
IGenerator Generator;
|
IGenerator Generator;
|
||||||
const KindOfLotto DEFAULT_GENERATOR = KindOfLotto.Uk;
|
const KindOfLotto DEFAULT_GENERATOR = KindOfLotto.Uk;
|
||||||
Dictionary<KindOfLotto, string> SpecialIdentifiers = new() {
|
Dictionary<KindOfLotto, string> SpecialIdentifiers = new() {
|
||||||
|
Loading…
Reference in New Issue
Block a user