public function isOver()
{
$numWerewolves = count($this->getWerewolves());
$numTanner = $this->getNumRole(Role::TANNER);
$numGood = count($this->getLivingPlayers()) - $numWerewolves;
if ($numTanner == 0) {
if ($this->getOriginalNumRole(Role::TANNER) > 0) {
$this->winningTeam = Role::TANNER;
return true;
}
}
if ($numWerewolves == 0) {
$this->winningTeam = Role::VILLAGER;
return true;
}
if ($numWerewolves >= $numGood) {
$this->winningTeam = Role::WEREWOLF;
return true;
}
return false;
}