예제 #1
0
 public function testGoalsAgainst()
 {
     $this->ranking->addGoalsAgainst(3);
     $this->ranking->addGoalsAgainst(2);
     $this->assertEquals(5, $this->ranking->getGoalsAgainst());
 }
예제 #2
0
파일: Ranking.php 프로젝트: 0ida/fussi
 /**
  * @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));
 }