diff --git a/foogame.game.php b/foogame.game.php index 2f7f67a..557fd1f 100644 --- a/foogame.game.php +++ b/foogame.game.php @@ -106,6 +106,10 @@ function actChangePreference($pref, $value) Preferences::set($this->getCurrentPId(), $pref, $value); } + function sendNotifications() { + // TODO + } + ///////////////////////////////////////////////////////////// // Exposing protected methods, please use at your own risk // ///////////////////////////////////////////////////////////// @@ -146,7 +150,7 @@ public function zombieTurn($state, $activePlayer) if ($state['type'] === 'multipleactiveplayer') { // Make sure player is in a non blocking status for role turn - $this->gamestate->setPlayerNonMultiactive($active_player, ''); + $this->gamestate->setPlayerNonMultiactive($activePlayer, ''); return; } diff --git a/modules/php/Core/Globals.php b/modules/php/Core/Globals.php index 455c14f..da6c866 100644 --- a/modules/php/Core/Globals.php +++ b/modules/php/Core/Globals.php @@ -1,7 +1,5 @@ diff --git a/modules/php/Helpers/Log.php b/modules/php/Helpers/Log.php index 0a0af71..f63c022 100644 --- a/modules/php/Helpers/Log.php +++ b/modules/php/Helpers/Log.php @@ -1,6 +1,7 @@ 9, diff --git a/modules/php/Managers/Players.php b/modules/php/Managers/Players.php index 7400a9b..0e1b93c 100644 --- a/modules/php/Managers/Players.php +++ b/modules/php/Managers/Players.php @@ -18,7 +18,7 @@ protected static function cast($row) return new \FOO\Models\Player($row); } - public function setupNewGame($players, $options) + public static function setupNewGame($players, $options) { // Create players $gameInfos = Game::get()->getGameinfos(); @@ -53,7 +53,7 @@ public function getCurrentId() return Game::get()->getCurrentPId(); } - public function getAll() + public static function getAll() { $players = self::DB()->get(false); return $players; @@ -83,7 +83,7 @@ public function getActive() return self::get(); } - public function getCurrent() + public static function getCurrent() { return self::get(self::getCurrentId()); } @@ -117,7 +117,7 @@ public function count() /* * getUiData : get all ui data of all players */ - public function getUiData($pId) + public static function getUiData($pId) { return self::getAll()->map(function ($player) use ($pId) { return $player->jsonSerialize($pId);