Skip to content

salter19/lotto

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Lotto

An application that imitates weekly lottery and calculates how many years it takes to win a jackpot.

Table of Contents

Introduction

LottoMachine has three optional types of lotto, with different rate of probability. The lottery runs till jackpot is reached in a lifetime (120 years).

Motivation

This application was build as a training project for course in Tampere University of Applied Sciences ( or Polytechnic, if you will).

Technologies

Project is created with:

  • Java 8.0
  • Visual Studio Code 1.39

Install

  • 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

Run:

  • In command-line with command java Main

Features

  • 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!

The concepts of lottery

Some main concepts in this application:

lottoType

  • 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

numberPool

Pool of numbers where the correct row is drawn from.
default starting int = 1

userRow

The lotto row user chooses for himself.

lottoRow

The lotto row that lottoMachine draws.

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages