Skip eliminated players

Game development with Board Game Arena Studio
Post Reply
User avatar
DargorX
Posts: 33
Joined: 10 September 2012, 20:16

Skip eliminated players

Post 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? :cry:
User avatar
Victoria_La
Posts: 665
Joined: 28 December 2015, 20:55

Re: Skip eliminated players

Post 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']
User avatar
DargorX
Posts: 33
Joined: 10 September 2012, 20:16

Re: Skip eliminated players

Post by DargorX »

I thought I would have to do something like this :roll:
But I think this need should be covered, I think it's a basic functionality.

Thanks Victoria.
Post Reply

Return to “Developers”