-
Notifications
You must be signed in to change notification settings - Fork 1
/
RatingSystemInterface.php
39 lines (35 loc) · 1.22 KB
/
RatingSystemInterface.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?php
namespace Lindelius\FIDE;
interface RatingSystemInterface
{
/**
* Calculate the new rating for a given contestant after having drawn with a
* given opponent.
*
* @param ContestantInterface $contestant
* @param ContestantInterface $opponent
* @param int|null $k
* @return int
*/
public function calculateRatingAfterDraw(ContestantInterface $contestant, ContestantInterface $opponent, ?int $k = null): int;
/**
* Calculate the new rating for a given contestant after having lost to a
* given opponent.
*
* @param ContestantInterface $contestant
* @param ContestantInterface $opponent
* @param int|null $k
* @return int
*/
public function calculateRatingAfterLoss(ContestantInterface $contestant, ContestantInterface $opponent, ?int $k = null): int;
/**
* Calculate the new rating for a given contestant after having won over a
* given opponent.
*
* @param ContestantInterface $contestant
* @param ContestantInterface $opponent
* @param int|null $k
* @return int
*/
public function calculateRatingAfterWin(ContestantInterface $contestant, ContestantInterface $opponent, ?int $k = null): int;
}