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