mirror of
https://github.com/JeroenED/libpairtwo.git
synced 2024-11-25 07:47:42 +01:00
BUGFIX: Match not played does not return error
This commit is contained in:
parent
acaef62332
commit
0d2b25fbef
@ -12,6 +12,7 @@ use MyCLabs\Enum\Enum;
|
|||||||
|
|
||||||
class Gameresult extends Enum
|
class Gameresult extends Enum
|
||||||
{
|
{
|
||||||
|
const None = '-';
|
||||||
const WhiteWins = '1-0';
|
const WhiteWins = '1-0';
|
||||||
const Draw = '0.5-0.5';
|
const Draw = '0.5-0.5';
|
||||||
const BlackWins = '0-1';
|
const BlackWins = '0-1';
|
||||||
|
@ -35,6 +35,12 @@ class Game extends GameModel
|
|||||||
if (isset($blacksplit[1]) && $blacksplit[1] != 'Bye') {
|
if (isset($blacksplit[1]) && $blacksplit[1] != 'Bye') {
|
||||||
$special = ' ' . $blacksplit[1];
|
$special = ' ' . $blacksplit[1];
|
||||||
}
|
}
|
||||||
|
if ($whitesplit[0] == '*') {
|
||||||
|
$whitesplit[0] = '';
|
||||||
|
}
|
||||||
|
if ($blacksplit[0] == '*') {
|
||||||
|
$blacksplit[0] = '';
|
||||||
|
}
|
||||||
$result = new Gameresult($whitesplit[0] . '-' . $blacksplit[0] . $special);
|
$result = new Gameresult($whitesplit[0] . '-' . $blacksplit[0] . $special);
|
||||||
$this->setResult($result);
|
$this->setResult($result);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user