/** * @param $playerOne * @param $playerTwo * @param $turn */ protected function outputEndGameInformation(Combatant $playerOne, Combatant $playerTwo, $turn) { if ($turn >= 30) { $this->info("The battle was a draw"); } else { $winner = $playerOne->isAlive() ? $playerOne : $playerTwo; $loser = !$playerOne->isAlive() ? $playerOne : $playerTwo; $this->info($loser->getName() . " has died in battle."); $this->info("The winner is " . $winner->getName()); } }