Ejemplo n.º 1
0
 public function test_it_returns_player_name()
 {
     $this->assertEquals(self::PLAYER_NAME, $this->player->getName());
 }
Ejemplo n.º 2
0
 /**
  * @param Player|null $winner
  */
 private function showResult(Player $winner = null)
 {
     $result = null === $winner ? "it's a draw!\n" : sprintf("%s has won! Congrats.\n", $winner->getName());
     $this->ioService->printMessageLine("End of the game: " . $result);
 }