Example #1
0
 public function testGoals()
 {
     $this->ranking->addGoals(5);
     $this->ranking->addGoals(2);
     $this->assertEquals(7, $this->ranking->getGoals());
 }
Example #2
0
 /**
  * @param \Application\Model\PlayerRanking $player
  * @param int                              $teamIndex
  * @param int                              $opponentIndex
  * @param \Application\Model\Entity\Game   $game
  */
 protected function setRankingForPlayer($player, $teamIndex, $opponentIndex, $game)
 {
     $player->addGoals($game->getGoalsForTeam($teamIndex));
     $player->addGoalsAgainst($game->getGoalsForTeam($opponentIndex));
     $player->addPoints($this->getPointsForPlayer($game, $teamIndex));
 }