/** * Add one point to the player * * @return void */ public function addPointFor(Player $player) { $player->addPoint(); if ($player->points > 10) { if ($this->playerWonSet($player)) { Event::fire(new Events\PlayerWonSet($player)); if ($this->playerWonMatch($player)) { Event::fire(new Events\PlayerWonMatch($player)); } } } }