mirror of
https://github.com/JeroenED/libpairtwo.git
synced 2024-10-31 20:56:08 +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 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