Esempio n. 1
0
 public function testSetTeamOne()
 {
     $player1 = new Player();
     $player2 = new Player();
     $this->match->setTeamOne($player1, $player2);
     $team = $this->match->getTeamOne();
     $this->assertSame($player1, $team->getAttackingPlayer());
     $this->assertSame($player2, $team->getDefendingPlayer());
 }
Esempio n. 2
0
 /**
  * @return int
  */
 protected function getPointsParticipant1()
 {
     if ($this->match instanceof SingleMatch) {
         return $this->match->getPlayer1()->getPoints();
     } else {
         if ($this->match instanceof DoubleMatch) {
             return $this->getPointsForTeam($this->match->getTeamOne());
         }
     }
 }