There is no more active player
Posted: 22 December 2021, 22:06
Ho Ho Community!
Issue
I am trying to implement a team setup screen and I am facing There is no more active player. Here my source code:
https://github.com/sderrico/decrypto-bga/
Code
All the players are at teamSetup state. When the last player click on READY, the next phase kick in: newRound and there is an action called stNewRound.
states.inc.php
decrypto.action.php
decrypto.game.php
Expecting result
All the player would be at newRound state and they are all active but the players are facing a Error: there is no more player!.
Thank you for your help or any pointers!
Sebastien
UI Draft

UI Error

Issue
I am trying to implement a team setup screen and I am facing There is no more active player. Here my source code:
https://github.com/sderrico/decrypto-bga/
Code
All the players are at teamSetup state. When the last player click on READY, the next phase kick in: newRound and there is an action called stNewRound.
states.inc.php
Code: Select all
20 => array(
"name" => "teamSetup",
"description" => clienttranslate('${actplayer} must choose a team'),
"descriptionmyturn" => clienttranslate('${you} must choose a team!'),
"type" => "multipleactiveplayer",
"possibleactions" => array( "changeTeamName", "completeTeamSetup", "switchTeam" ),
"transitions" => array( "newRound" => 30 )
),
30 => array(
"name" => "newRound",
"description" => clienttranslate('${actplayer} must guess for team1'),
"descriptionmyturn" => clienttranslate('${you} must guess for team1!'),
"type" => "activeplayer",
"possibleactions" => array( "guess" ),
"action" => "stNewRound",
"transitions" => array( "playCard" => 20, "pass" => 20 )
),
Code: Select all
public function completeTeamSetup()
{
self::setAjaxMode();
$this->game->completeTeamSetup();
self::ajaxResponse();
}
Code: Select all
function completeTeamSetup()
{
$playerId = $this->getCurrentPlayerId();
$this->gamestate->setPlayerNonMultiactive($playerId, 'newRound');
}
function stNewRound()
{
$this->gamestate->setAllPlayersMultiactive();
}
All the player would be at newRound state and they are all active but the players are facing a Error: there is no more player!.
Thank you for your help or any pointers!
Sebastien
UI Draft

UI Error
