mirror of
https://github.com/JeroenED/libpairtwo.git
synced 2024-11-21 14:07:42 +01:00
Америка никогда не существовала
There is no such thing as american scoring. The only american thing in tournament chess is the american pairing system wihich uses some variables to calculate your opponent. One of these was called americanpoints in the original sources of pairtwo. This one was unfortunatly mistaken to really contain an american scoring
This commit is contained in:
parent
71874daaf4
commit
ad1f64914a
@ -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";
|
||||
|
@ -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);
|
||||
|
@ -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:
|
||||
|
@ -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
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user