mirror of
https://github.com/furyfire/trueskill.git
synced 2025-03-20 16:48:04 +00:00
First TwoPlayerTrueSkillCalculator unit test passed
This commit is contained in:
30
PHPSkills/Elo/FideKFactor.php
Normal file
30
PHPSkills/Elo/FideKFactor.php
Normal file
@ -0,0 +1,30 @@
|
||||
<?php
|
||||
namespace Moserware\Skills\Elo;
|
||||
|
||||
require_once(dirname(__FILE__) . "/KFactor.php");
|
||||
|
||||
// see http://ratings.fide.com/calculator_rtd.phtml for details
|
||||
class FideKFactor extends KFactor
|
||||
{
|
||||
public function getValueForRating($rating)
|
||||
{
|
||||
if ($rating < 2400)
|
||||
{
|
||||
return 15;
|
||||
}
|
||||
|
||||
return 10;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates someone who has played less than 30 games.
|
||||
*/
|
||||
class ProvisionalFideKFactor extends FideKFactor
|
||||
{
|
||||
public function getValueForRating($rating)
|
||||
{
|
||||
return 25;
|
||||
}
|
||||
}
|
||||
?>
|
Reference in New Issue
Block a user