mirror of
https://github.com/furyfire/trueskill.git
synced 2025-04-19 12:24:28 +00:00
Pint applied for formatting
This commit is contained in:
@ -1,24 +1,29 @@
|
||||
<?php namespace DNW\Skills;
|
||||
<?php
|
||||
|
||||
namespace DNW\Skills;
|
||||
|
||||
/**
|
||||
* Represents a comparison between two players.
|
||||
*
|
||||
* @internal The actual values for the enum were chosen so that the also correspond to the multiplier for updates to means.
|
||||
*/
|
||||
class PairwiseComparison
|
||||
{
|
||||
const WIN = 1;
|
||||
|
||||
const DRAW = 0;
|
||||
|
||||
const LOSE = -1;
|
||||
|
||||
public static function getRankFromComparison($comparison)
|
||||
{
|
||||
switch ($comparison) {
|
||||
case PairwiseComparison::WIN:
|
||||
return array(1, 2);
|
||||
return [1, 2];
|
||||
case PairwiseComparison::LOSE:
|
||||
return array(2, 1);
|
||||
return [2, 1];
|
||||
default:
|
||||
return array(1, 1);
|
||||
return [1, 1];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user