Skip to content

Instantly share code, notes, and snippets.

@YNSTakeru
Last active February 23, 2024 06:15
Show Gist options
  • Save YNSTakeru/257e196e0ab5ef1ddf6ef3fa041d5bf4 to your computer and use it in GitHub Desktop.
Save YNSTakeru/257e196e0ab5ef1ddf6ef3fa041d5bf4 to your computer and use it in GitHub Desktop.
PHPのミュータブル
<?php
class GameManager {
public function play()
{
$this->candidateWinnerPlayers = $this->players;
while(!$this->getIsEnd()){
echo "戦争!".PHP_EOL;
$this->submitCardToField();
$this->displayFieldCard();
$this->judge();
}
$this->sortPlayersByScore();
$this->displayRanking();
echo "戦争を終了します。".PHP_EOL;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment