2010-08-28 22:05:41 -04:00
|
|
|
<?php
|
|
|
|
namespace Moserware\Skills;
|
|
|
|
|
2010-10-02 21:15:47 -04:00
|
|
|
require_once(dirname(__FILE__) . '/Player.php');
|
|
|
|
require_once(dirname(__FILE__) . '/Rating.php');
|
2010-08-28 22:05:41 -04:00
|
|
|
require_once(dirname(__FILE__) . '/RatingContainer.php');
|
|
|
|
|
|
|
|
class Team extends RatingContainer
|
|
|
|
{
|
2010-10-03 20:17:34 -04:00
|
|
|
public function __construct(Player &$player = null, Rating $rating = null)
|
2010-09-25 12:50:33 -04:00
|
|
|
{
|
|
|
|
parent::__construct();
|
|
|
|
|
2010-08-28 22:05:41 -04:00
|
|
|
if(!\is_null($player))
|
|
|
|
{
|
|
|
|
$this->addPlayer($player, $rating);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2010-10-03 20:17:34 -04:00
|
|
|
public function addPlayer(Player &$player, Rating $rating)
|
2010-08-28 22:05:41 -04:00
|
|
|
{
|
|
|
|
$this->setRating($player, $rating);
|
|
|
|
return $this;
|
2010-10-02 21:15:47 -04:00
|
|
|
}
|
2010-08-28 22:05:41 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
?>
|