Skip to content

UP819950/Match-Simulation-Algorithm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

Match Score Simulation

A quick function to return random football scores with realistic score probabilities.

Installation

In your desired console run:

npm i match-simulation-algorithm

Usage

In your js file require the package by writing:

const matchSim = require('match-simulation-algorithm');

Call the getScore() function like so (must be assigned to a variable):

const result = matchSim.getScore();

Output

returns an object with two variables: homeScore and awayScore

Example output:

{ homeScore: 3, awayScore: 2 }

These can be accessed like so:

const homeScore = result.homeScore;
const awayScore = result.awayScore;

About

A quick function to return random football scores with realistic score probabilities.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors