An application that imitates weekly lottery and calculates how many years it takes to win a jackpot.
LottoMachine has three optional types of lotto, with different rate of probability. The lottery runs till jackpot is reached in a lifetime (120 years).
This application was build as a training project for course in Tampere University of Applied Sciences ( or Polytechnic, if you will).
Project is created with:
- Java 8.0
- Visual Studio Code 1.39
- Clone or download the repo
- In command-line:
- navigate inside the directory and then
\lotto\src\fi\tuni\tamk\tiko\salter\ - compile with command
javac Main.java
- navigate inside the directory and then
Run:
- In command-line with command
java Main
- Three different types of lottery
- Option to insert user's lotto row
- straight from command-line or
- within application
- Keeps count of first appearances of each amount of right numbers e.g.
Got 2 right! Took 0 years - Optional print out for weekly row(s) and statistics
- When jackpot is reach, prints out the game statistics
- Shows how frustratingly unlikely it is to hit the jackpot in one lifetime!
Some main concepts in this application:
-
regular
Number pool's range: 1 - 40
Lotto row's length: 7 -
bigWin
Number pool's range: 1 - 80
Lotto row's length: 9 -
testRun
Number pool's range: 1 - 15
Lotto row's length: 5
Pool of numbers where the correct row is drawn from.
default starting int = 1
The lotto row user chooses for himself.
The lotto row that lottoMachine draws.