當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Game::createGame方法代碼示例

本文整理匯總了PHP中Game::createGame方法的典型用法代碼示例。如果您正苦於以下問題:PHP Game::createGame方法的具體用法?PHP Game::createGame怎麽用?PHP Game::createGame使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Game的用法示例。


在下文中一共展示了Game::createGame方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: die

<?php

die("We are currently upgrading EVERYTHING - We should be up soon!");
session_start();
$whitelist = array('replay');
require 'controller/dbsettings.php';
//create game
error_reporting(E_ALL);
ini_set('display_errors', 1);
Game::createGame($replay);
?>
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">


	<title>Start a Game</title>

	<link rel="stylesheet" href="style/global.css">
	<link rel="stylesheet" href="style/startQuiz.css">
	<script src="http://autobahn.s3.amazonaws.com/js/autobahn.min.js"></script>
	<script src="scripts/startQuiz.js"></script>
	<script src="scripts/mapdata.js"></script>
	<script src="scripts/continentmap.js"></script>
	<script src="scripts/global.js"></script>
	<script src="scripts/socketScripts.js"></script>
	<script src="scripts/cloud.js"></script>
	<script src="scripts/jquery.js"></script>

開發者ID:theborland,項目名稱:myhoot,代碼行數:29,代碼來源:startQuizBackup.php

示例2: session_start

<?php

session_start();
//$_SESSION = array();
//$_SESSION["auto"]="";
require 'controller/dbsettings.php';
//create game
Game::createGame();
//die ($_SESSION["auto"]);
?>
 <html>
 <head>
 	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">

    <link rel="stylesheet" href="style/global.css">
    <link rel="stylesheet" href="style/joinQuiz.css">
    <link rel="stylesheet" href="style/startQuiz.css">

	<script src="mapdata.js"></script>
	<script src="continentmap.js"></script>
	<script src="http://autobahn.s3.amazonaws.com/js/autobahn.min.js"></script>
	<script src="socketScripts.js"></script>
	<script src="scripts/startQuiz.js"></script>
	<script src="scripts/music.js"></script>
<script>



window.onload = function() {
	//alert($("#qInfoLocation").height());
開發者ID:theborland,項目名稱:myhoot,代碼行數:31,代碼來源:startQuiz.php

示例3: createGame

 public function createGame($level)
 {
     $game = $this->games()->save(new Game(['level_id' => $level->id, 'game' => Game::createGame($level)]));
     return $game;
 }
開發者ID:valterlorran,項目名稱:campo-minado,代碼行數:5,代碼來源:User.php

示例4: array

<?php

require '../controller/dbsettings.php';
include '../controller/siteFunctions.php';
include '../controller/Question.php';
include '../controller/Game.php';
include '../controller/Answer.php';
include '../controller/User.php';
//$sql = "DELETE FROM `questionsSingle`";
$result = $conn->query($sql);
$_SESSION["single"] = true;
$playedGames = array();
$_SESSION["regionsSelected"] = $regionsSelected = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11);
$gamesSelected = array("time", "weather", "pt", "places", "places", "facts", "facts", "geo", "geo", "geo", "geo", "geo");
//$gamesSelected=array("time","weather");
Game::createGame(false, true);
$_SESSION["questionNumber"] = getLastQuestion() + 1;
echo $_SESSION["questionNumber"] . "<Br>Starting";
while (true) {
    if (sizeof($playedGames) == 0) {
        $current = $gamesSelected[rand(0, count($gamesSelected) - 1)];
    } else {
        $idealArray = array_count_values($gamesSelected);
        $currentArray = array_count_values($playedGames);
        $current = $gamesSelected[rand(0, count($gamesSelected) - 1)];
        while (array_key_exists($current, $currentArray) && $currentArray[$current] / sizeof($playedGames) > $idealArray[$current] / sizeof($gamesSelected)) {
            //echo ("current". $current.($currentArray[$current]/sizeof($playedGames)));
            $current = $gamesSelected[rand(0, count($gamesSelected) - 1)];
        }
        //
    }
開發者ID:theborland,項目名稱:myhoot,代碼行數:31,代碼來源:server.php


注:本文中的Game::createGame方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。