match-result-prediction
v2.0.0
Published
A simple match prediction code based on the club coefficient.
Downloads
72
Readme
Match Result Prediction 🎯
A sophisticated TypeScript library for predicting football match results based on team coefficients. Perfect for sports simulations, game development, or statistical analysis.
🚀 Features
- Type-safe with full TypeScript support
- Realistic score predictions based on team strength
- Configurable draw and win conditions
- Zero dependencies
- Functional programming approach
- Well-tested and maintained
📦 Installation
npm install match-result-prediction
# or
yarn add match-result-prediction
# or
pnpm add match-result-prediction
Usage
Simply pass the params for teams:
import { matchResultPrediction } from 'match-result-prediction';
const scores = matchResultPrediction({
homeTeamCoef: 0.91,
awayTeamCoef: 0.75,
drawMax: 3,
winMax: 5
});
Params
homeTeamCoef
- Home team coefficient.Float
in range from0
to1
awayTeamCoef
- Away team coefficient.Float
in range from0
to1
drawMax
- When randomly draw is selected, this will be maximum value of a draw scorewinMax
- When randomly win is selected, this will be maximum value of winning team
License
MIT-Licensed.