Akira.Lottery 1.0.0

Library to help generate lottery ticket.
Currently, only supported for Vietnam Lottery Ticket.

Install-Package Akira.Lottery -Version 1.0.0
dotnet add package Akira.Lottery --version 1.0.0
<PackageReference Include="Akira.Lottery" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Akira.Lottery --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Lottery Ticket Generator & Checker

Lottery ticket generator for multiple games as Keno, 6/45, 6/55, Loto 2, Loto 3...

Features

  • Support games:
    • Keno 60
    • Keno 70
    • Keno 80
    • Mega 6/45
    • Mega 6/55
    • Loto 2 numbers
    • Loto 3 numbers
    • Loto 4 numbers
  • Generate ticket based on type of game selection
  • Check ticket number with draw result; are you winner?
  • Your Name, Birth Date and time of generate ticket will be affected while ticket generating.

Example & First Run (C#)

<i>Generate tickets:</i>

<pre>
<code>var ticketType = TicketType.Mega645;</code>
<code>var ticketOwner = new TicketOwner("NGUYEN VAN MINH", new DateTime(1984, 08, 01));</code>

<code>var lotteryTicket = new LotteryTicket(ticketType, ticketOwner, 2);</code>
<code>lotteryTicket.GenerateTicket();</code>
</pre>

Hack draw number for test result checker

<pre>
<code>var drawNumbers = new List<int> { 3, 7, 11, 55, 38, 40 };</code>

<code>var lotteryDrawResult = new LotteryDrawResult(ticketType, DateTime.Now, drawNumbers);</code>
<code>var ticketChecker = new LotteryResultChecker(lotteryTicket, lotteryDrawResult);</code>

<code>Console.WriteLine($"+++ You bought {lotteryTicket.TicketNumbers.Count} ticket(s):");</code>
<code>foreach (var item in lotteryTicket.TicketNumbers)</code>
<code> Console.WriteLine(" " + string.Join('-', item.Select(r => r.ToString()).ToArray()));</code>

<code>Console.WriteLine();</code>
</pre>

Lottery Ticket Generator & Checker

Lottery ticket generator for multiple games as Keno, 6/45, 6/55, Loto 2, Loto 3...

Features

  • Support games:
    • Keno 60
    • Keno 70
    • Keno 80
    • Mega 6/45
    • Mega 6/55
    • Loto 2 numbers
    • Loto 3 numbers
    • Loto 4 numbers
  • Generate ticket based on type of game selection
  • Check ticket number with draw result; are you winner?
  • Your Name, Birth Date and time of generate ticket will be affected while ticket generating.

Example & First Run (C#)

<i>Generate tickets:</i>

<pre>
<code>var ticketType = TicketType.Mega645;</code>
<code>var ticketOwner = new TicketOwner("NGUYEN VAN MINH", new DateTime(1984, 08, 01));</code>

<code>var lotteryTicket = new LotteryTicket(ticketType, ticketOwner, 2);</code>
<code>lotteryTicket.GenerateTicket();</code>
</pre>

Hack draw number for test result checker

<pre>
<code>var drawNumbers = new List<int> { 3, 7, 11, 55, 38, 40 };</code>

<code>var lotteryDrawResult = new LotteryDrawResult(ticketType, DateTime.Now, drawNumbers);</code>
<code>var ticketChecker = new LotteryResultChecker(lotteryTicket, lotteryDrawResult);</code>

<code>Console.WriteLine($"+++ You bought {lotteryTicket.TicketNumbers.Count} ticket(s):");</code>
<code>foreach (var item in lotteryTicket.TicketNumbers)</code>
<code> Console.WriteLine(" " + string.Join('-', item.Select(r => r.ToString()).ToArray()));</code>

<code>Console.WriteLine();</code>
</pre>

  • .NETCoreApp 2.2

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.0.0 108 1/9/2020