Skip to content

innashpota/powerball

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Powerball build

A java library implementing rules of Powerball game.

How to use

// initialize a game
List<Ticket> tickets = asList(ticket1, ticket2, ...);
Balls winningBalls = new BallsCreator().randomBalls();
PowerballGame game = new PowerballGame(tickets, winningBalls);

// calculate a result
Result result = game.result();

// get information form the game result
result.getWinners();
result.getWinningBalls();
result.getTotalTicketsByMatch();
result.getTotalPrize();