ferranfg/elo-rating
最新稳定版本:1.2.0
Composer 安装命令:
composer require ferranfg/elo-rating
包简介
A PHP implementation of Elo rating system
README 文档
README
A PHP class which implements the Elo rating system for Fantasy Padel Tour.
Install with composer
composer require ferranfg/elo-rating
Link to Packagist.org: https://packagist.org/packages/ferranfg/elo-rating
Usage
require 'src/Rating/Rating.php';
// player A elo = 1000
// player B elo = 2000
// player A lost
// player B win
$rating = new Rating(1000, 2000, Rating::LOST, Rating::WIN);
// player A elo = 1000
// player B elo = 2000
// player A draw
// player B draw
$rating = new Rating(1000, 2000, Rating::DRAW, Rating::DRAW);
$results = $rating->getNewRatings();
echo "New rating for player A: " . $results['a'];
echo "New rating for player B: " . $results['b'];
Credits
Elo Rating PHP by Michal Chovanec is licensed under a Creative Commons Attribution 4.0 International License.
统计信息
- 总下载量: 14
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2023-01-11