libpairtwo/src/Models/Game.php

79 lines
1.3 KiB
PHP
Raw Normal View History

<?php
/**
* Created by PhpStorm.
* User: jeroen
* Date: 1/02/19
* Time: 17:16
*/
namespace JeroenED\Libpairtwo\Models;
use JeroenED\Libpairtwo\Enums\Gameresult;
2019-03-20 17:33:09 +01:00
use JeroenED\Libpairtwo\Pairing;
2019-05-27 13:06:35 +02:00
abstract class Game
{
2019-05-28 14:10:42 +02:00
/** @var Pairing|null */
private $white;
2019-05-28 14:10:42 +02:00
/** @var Pairing|null */
private $black;
/** @var GameResult|null */
private $result;
/**
2019-05-28 14:10:42 +02:00
* @return Pairing|null
*/
2019-05-28 14:10:42 +02:00
public function getWhite(): ?Pairing
{
return $this->white;
}
/**
2019-05-28 14:10:42 +02:00
* @param Pairing|null $white
* @return Game
*/
2019-05-28 14:10:42 +02:00
public function setWhite(?Pairing $white): Game
{
$this->white = $white;
2019-05-28 14:10:42 +02:00
return $this;
}
/**
2019-05-28 14:10:42 +02:00
* @return Pairing|null
*/
2019-05-28 14:10:42 +02:00
public function getBlack(): ?Pairing
{
return $this->black;
}
/**
2019-05-28 14:10:42 +02:00
* @param Pairing|null $black
* @return Game
*/
2019-05-28 14:10:42 +02:00
public function setBlack(?Pairing $black): Game
{
$this->black = $black;
2019-05-28 14:10:42 +02:00
return $this;
}
/**
* @return Gameresult|null
*/
public function getResult(): ?Gameresult
{
return $this->result;
}
/**
* @param Gameresult|null $result
2019-05-28 14:10:42 +02:00
* @return Game
*/
public function setResult(?Gameresult $result): Game
{
$this->result = $result;
2019-05-28 14:10:42 +02:00
return $this;
}
2019-02-11 17:37:30 +01:00
}