コード例 #1
0
ファイル: GameView.php プロジェクト: jc222fi/Tick_tack_toe
 public function getWinner(\model\Player $winner)
 {
     if ($winner->getName() != "Computer") {
         $this->winner = "<p>Congratulations " . $winner->getName() . "! You won this round.</p>";
     } else {
         if ($winner->getName() === "Computer") {
             $this->winner = "<p>Sorry, the " . $winner->getName() . " won this round.</p>";
         } else {
             $this->winner = null;
         }
     }
 }