mirror of
https://github.com/JeroenED/libpairtwo.git
synced 2024-11-23 06:56:58 +01:00
Several fixes
This commit is contained in:
parent
1a7f3eae26
commit
9bf4cdaec3
2
dist/template.php
vendored
2
dist/template.php
vendored
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
// EDIT ME!
|
// EDIT ME!
|
||||||
$pairingfile = 'your pairing-file.swar';
|
$pairingfile = 'your pairing-file.swar';
|
||||||
$fileformat = 'Swar-4'; // Possible getValue()s: Pairtwo-5, Pairtwo-6, Swar-4
|
$fileformat = 'Swar-4'; // Possible values: Pairtwo-5, Pairtwo-6, Swar-4
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
|
@ -224,7 +224,7 @@ class Player
|
|||||||
{
|
{
|
||||||
$points = 0;
|
$points = 0;
|
||||||
foreach ($this->Pairings as $key=>$pairing) {
|
foreach ($this->Pairings as $key=>$pairing) {
|
||||||
if($key < $round || $round == -1) {
|
if ($key < $round || $round == -1) {
|
||||||
if (array_search($pairing->Result, Constants::Won) !== false) {
|
if (array_search($pairing->Result, Constants::Won) !== false) {
|
||||||
$points = $points + 1;
|
$points = $points + 1;
|
||||||
} elseif (array_search($pairing->Result, Constants::Draw) !== false) {
|
} elseif (array_search($pairing->Result, Constants::Draw) !== false) {
|
||||||
@ -330,7 +330,7 @@ class Player
|
|||||||
*/
|
*/
|
||||||
public function __get(string $key)
|
public function __get(string $key)
|
||||||
{
|
{
|
||||||
if($key == 'PlayedGames') {
|
if ($key == 'PlayedGames') {
|
||||||
return $this->playedGames();
|
return $this->playedGames();
|
||||||
} elseif ($key == 'NoOfWins') {
|
} elseif ($key == 'NoOfWins') {
|
||||||
return $this->noOfWins();
|
return $this->noOfWins();
|
||||||
|
@ -150,14 +150,11 @@ class Round
|
|||||||
{
|
{
|
||||||
if ($key == 'Bye') {
|
if ($key == 'Bye') {
|
||||||
return $this->bye();
|
return $this->bye();
|
||||||
}
|
} elseif ($key == 'Absent') {
|
||||||
elseif ($key == 'Absent') {
|
|
||||||
return $this->absent();
|
return $this->absent();
|
||||||
}
|
} elseif ($key == 'GamesByBoard') {
|
||||||
elseif ($key == 'GamesByBoard') {
|
|
||||||
return $this->gamesByBoard();
|
return $this->gamesByBoard();
|
||||||
}
|
} elseif (isset($this->BinaryData[$key])) {
|
||||||
elseif (isset($this->BinaryData[$key])) {
|
|
||||||
return $this->BinaryData[$key];
|
return $this->BinaryData[$key];
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
@ -928,14 +928,11 @@ class Tournament
|
|||||||
{
|
{
|
||||||
if ($key == 'Participants') {
|
if ($key == 'Participants') {
|
||||||
return $this->participants();
|
return $this->participants();
|
||||||
}
|
} elseif ($key == 'AverageElo') {
|
||||||
elseif ($key == 'AverageElo') {
|
|
||||||
return $this->averageElo();
|
return $this->averageElo();
|
||||||
}
|
} elseif ($key == 'Ranking') {
|
||||||
elseif ($key == 'Ranking') {
|
|
||||||
return $this->ranking();
|
return $this->ranking();
|
||||||
}
|
} elseif (isset($this->BinaryData[$key])) {
|
||||||
elseif (isset($this->BinaryData[$key])) {
|
|
||||||
return $this->BinaryData[$key];
|
return $this->BinaryData[$key];
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
Loading…
Reference in New Issue
Block a user