mirror of
https://github.com/JeroenED/libpairtwo.git
synced 2024-11-22 06:26:57 +01:00
REMOVED: Tiebreak::American
and all its uses were removed
This commit is contained in:
parent
8a0fd88b55
commit
9385a77148
@ -3,6 +3,7 @@
|
|||||||
## vx.y.z (Release: aa-bbb-cccc)
|
## vx.y.z (Release: aa-bbb-cccc)
|
||||||
* NEW FEATURE: `Game::getBoard()` for getting the board number of the game
|
* 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)
|
* 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)
|
## v1.2 (Release: 28-sep-2019)
|
||||||
* NEW READER: `Readers\Swar-4` for reading out files created with SWAR version 4.
|
* NEW READER: `Readers\Swar-4` for reading out files created with SWAR version 4.
|
||||||
|
@ -29,7 +29,6 @@ class Tiebreak extends Enum
|
|||||||
const None = "";
|
const None = "";
|
||||||
const Keizer = "Keizer";
|
const Keizer = "Keizer";
|
||||||
const Points = "Points";
|
const Points = "Points";
|
||||||
const American = "American";
|
|
||||||
const Buchholz = "Buchholz";
|
const Buchholz = "Buchholz";
|
||||||
const BuchholzMed = "Buchholz Median";
|
const BuchholzMed = "Buchholz Median";
|
||||||
const BuchholzCut = "Buchholz Cut";
|
const BuchholzCut = "Buchholz Cut";
|
||||||
|
@ -887,11 +887,10 @@ class Pairtwo6 implements ReaderInterface
|
|||||||
$firstElement = new Tiebreak(Tiebreak::Keizer);
|
$firstElement = new Tiebreak(Tiebreak::Keizer);
|
||||||
break;
|
break;
|
||||||
case TournamentSystem::American:
|
case TournamentSystem::American:
|
||||||
$firstElement = new Tiebreak(Tiebreak::American);
|
|
||||||
break;
|
|
||||||
case TournamentSystem::Closed:
|
case TournamentSystem::Closed:
|
||||||
case TournamentSystem::Swiss:
|
case TournamentSystem::Swiss:
|
||||||
$firstElement = new Tiebreak(Tiebreak::Points);
|
$firstElement = new Tiebreak(Tiebreak::Points);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
$tiebreaks = $this->getTournament()->getTiebreaks();
|
$tiebreaks = $this->getTournament()->getTiebreaks();
|
||||||
array_unshift($tiebreaks, $firstElement);
|
array_unshift($tiebreaks, $firstElement);
|
||||||
|
@ -631,8 +631,6 @@ class Swar4 implements ReaderInterface
|
|||||||
{
|
{
|
||||||
switch ($this->getTournament()->getSystem()) {
|
switch ($this->getTournament()->getSystem()) {
|
||||||
case TournamentSystem::American:
|
case TournamentSystem::American:
|
||||||
$firstElement = new Tiebreak(Tiebreak::American);
|
|
||||||
break;
|
|
||||||
case TournamentSystem::Closed:
|
case TournamentSystem::Closed:
|
||||||
case TournamentSystem::Swiss:
|
case TournamentSystem::Swiss:
|
||||||
default:
|
default:
|
||||||
|
@ -421,9 +421,6 @@ class Tournament
|
|||||||
case Tiebreak::Keizer:
|
case Tiebreak::Keizer:
|
||||||
return $this->calculateKeizer($player);
|
return $this->calculateKeizer($player);
|
||||||
break;
|
break;
|
||||||
case Tiebreak::American:
|
|
||||||
return $this->calculateAmerican($player);
|
|
||||||
break;
|
|
||||||
case Tiebreak::Points:
|
case Tiebreak::Points:
|
||||||
return $this->calculatePoints($player);
|
return $this->calculatePoints($player);
|
||||||
break;
|
break;
|
||||||
@ -528,19 +525,6 @@ class Tournament
|
|||||||
return $player->getBinaryData('ScoreAmerican');
|
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
|
* Number of points
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user