コード例 #1
0
ファイル: PlayerRankingTest.php プロジェクト: 0ida/fussi
 public function testNumberOfMatches()
 {
     $this->ranking->addPoints(3);
     $this->ranking->addPoints(2);
     $this->assertEquals(2, $this->ranking->getMatchCount());
 }
コード例 #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));
 }