Example #1
0
 /**
  * @return Round
  */
 protected function getVictoriousRound()
 {
     $winner = new Player('Player 1', [new Card('A', 'spades')]);
     $round = new Round($winner, new Player('Loser', [new Card('2', 'clubs')]));
     $round->play();
     return $round;
 }
Example #2
0
 protected function playRound()
 {
     $round = new Round($this->player1, $this->player2);
     try {
         $round->play();
         $round->victor()->capture($round->cardsPlayed());
         $this->rounds->push($round);
     } catch (NoCardsToPlayException $e) {
         $this->endGame();
     }
 }