/** * Purpose: default constructor * Preconditions: none * Postconditions: parent object started **/ function hangman() { /** * instantiate the parent game class so this class * inherits all of the game class's attributes * and methods **/ game::start(); }
rollbackAndDie(); } // try to get the game if (!$game->get($gameId)) { rollbackAndDie(); } // can only be started if just created if ($game->getStatus() != Params::$gameStatus[0]) { rollbackAndDie(); } // can only be started if > 1 team if ($game->getNbTeam() < 2) { rollbackAndDie(); } // try to start the game! if (!$game->start()) { rollbackAndDie(); } break; // ------------------------------ // teamAction // ------------------------------ // ------------------------------ // teamAction // ------------------------------ case 'teamAction': // check inputs if (!isset($_GET['gameId']) or !isset($_GET['round']) or !isset($_GET['teamId']) or !isset($_GET['teamToken'])) { rollbackAndDie(); } // get the game