More type work.

This commit is contained in:
2023-08-02 10:10:57 +00:00
parent a60187a3fd
commit 5c7471963c
14 changed files with 43 additions and 38 deletions

View File

@ -10,7 +10,7 @@ use Exception;
abstract class SkillCalculator
{
protected function __construct(
private $supportedOptions,
private int $supportedOptions,
private readonly TeamsRange $totalTeamsAllowed,
private readonly PlayersRange $playersPerTeamAllowed
) {
@ -22,13 +22,13 @@ abstract class SkillCalculator
* @param GameInfo $gameInfo Parameters for the game.
* @param array $teamsOfPlayerToRatings A mapping of team players and their ratings.
* @param array $teamRanks The ranks of the teams where 1 is first place. For a tie, repeat the number (e.g. 1, 2, 2).
* @return All the players and their new ratings.
* @return RatingContainer All the players and their new ratings.
*/
abstract public function calculateNewRatings(
GameInfo $gameInfo,
array $teamsOfPlayerToRatings,
array $teamRanks
);
): RatingContainer;
/**
* Calculates the match quality as the likelihood of all teams drawing.