Merge branch 'task/remove-amercan' into develop

This commit is contained in:
Jeroen De Meerleer 2019-10-26 23:30:09 +02:00
commit ad40f30561
Signed by: JeroenED
GPG Key ID: 28CCCB8F62BFADD6
5 changed files with 2 additions and 21 deletions

View File

@ -3,6 +3,7 @@
## vx.y.z (Release: aa-bbb-cccc)
* NEW FEATURE: `Game::getBoard()` for getting the board number of the game
* CHANGE: Some fields has been renamed to match coding guideline (Please see [1ab96fa](https://github.com/JeroenED/libpairtwo/commit/1ab96fa04782c1b0f2b6bb9d1bac8397a74ab38e) for more info)
* REMOVED: `Tiebreak::American` and all its uses were removed (Please see [a6015ae](https://github.com/JeroenED/libpairtwo/commit/a6015ae8169f0973f4937605d0f807aacc233630) for more info)
## v1.2 (Release: 28-sep-2019)
* NEW READER: `Readers\Swar-4` for reading out files created with SWAR version 4.

View File

@ -29,7 +29,6 @@ class Tiebreak extends Enum
const None = "";
const Keizer = "Keizer";
const Points = "Points";
const American = "American";
const Buchholz = "Buchholz";
const BuchholzMed = "Buchholz Median";
const BuchholzCut = "Buchholz Cut";

View File

@ -887,11 +887,10 @@ class Pairtwo6 implements ReaderInterface
$firstElement = new Tiebreak(Tiebreak::Keizer);
break;
case TournamentSystem::American:
$firstElement = new Tiebreak(Tiebreak::American);
break;
case TournamentSystem::Closed:
case TournamentSystem::Swiss:
$firstElement = new Tiebreak(Tiebreak::Points);
break;
}
$tiebreaks = $this->getTournament()->getTiebreaks();
array_unshift($tiebreaks, $firstElement);

View File

@ -631,8 +631,6 @@ class Swar4 implements ReaderInterface
{
switch ($this->getTournament()->getSystem()) {
case TournamentSystem::American:
$firstElement = new Tiebreak(Tiebreak::American);
break;
case TournamentSystem::Closed:
case TournamentSystem::Swiss:
default:

View File

@ -421,9 +421,6 @@ class Tournament
case Tiebreak::Keizer:
return $this->calculateKeizer($player);
break;
case Tiebreak::American:
return $this->calculateAmerican($player);
break;
case Tiebreak::Points:
return $this->calculatePoints($player);
break;
@ -528,19 +525,6 @@ class Tournament
return $player->getBinaryData('ScoreAmerican');
}
/**
* Points following american system
*
* @param Player $player
* @return float | null
*/
private function calculateAmerican(Player $player): ?float
{
return $player->getBinaryData('ScoreAmerican');
}
/**
* Number of points
*