当前位置: 首页>>代码示例>>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;未经允许,请勿转载。