2022-07-05 15:55:47 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace DNW\Skills;
|
2010-08-28 22:05:41 -04:00
|
|
|
|
|
|
|
class Team extends RatingContainer
|
|
|
|
{
|
2016-05-24 16:31:21 +02:00
|
|
|
public function __construct(Player $player = null, Rating $rating = null)
|
2010-09-25 12:50:33 -04:00
|
|
|
{
|
|
|
|
parent::__construct();
|
2022-07-05 15:33:34 +02:00
|
|
|
|
2022-07-05 15:55:47 +02:00
|
|
|
if (! is_null($player)) {
|
2010-08-28 22:05:41 -04:00
|
|
|
$this->addPlayer($player, $rating);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-08-01 12:26:38 +00:00
|
|
|
public function addPlayer(Player $player, Rating $rating): self
|
2010-08-28 22:05:41 -04:00
|
|
|
{
|
|
|
|
$this->setRating($player, $rating);
|
2022-07-05 15:55:47 +02:00
|
|
|
|
2010-08-28 22:05:41 -04:00
|
|
|
return $this;
|
2022-07-05 15:33:34 +02:00
|
|
|
}
|
2022-07-05 15:55:47 +02:00
|
|
|
}
|