Page 1 of 1
Skip eliminated players
Posted: 07 September 2021, 16:54
by DargorX
I found that
activeNextPlayer() does not skip an eliminated player, and then zombieTurn is triggered. Is this behaviour ok?
I don't want eliminated players get turns anymore. How can I avoid this?

Re: Skip eliminated players
Posted: 07 September 2021, 17:01
by Victoria_La
You have to check yourself I guess.
if (/check if all players elimintaed/) { end of game}
else {
while ($player=$this->activeNextPlayer()) {
if (!$this->isEliminated($player)) break;
}
}
isEiliminated is not function that exists you have to write it yourself, something along lines (did not test not sure basic info has it but its in player table)
$players = $this->loadBasicPlayersInfo();
return $players[$player_id]['player_eliminated']
Re: Skip eliminated players
Posted: 08 September 2021, 08:43
by DargorX
I thought I would have to do something like this
But I think this need should be covered, I think it's a basic functionality.
Thanks Victoria.