本文整理汇总了PHP中CR3DCQuery::TGameStatus方法的典型用法代码示例。如果您正苦于以下问题:PHP CR3DCQuery::TGameStatus方法的具体用法?PHP CR3DCQuery::TGameStatus怎么用?PHP CR3DCQuery::TGameStatus使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CR3DCQuery
的用法示例。
在下文中一共展示了CR3DCQuery::TGameStatus方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: GetStringFromStringTable
if ($oR3DCQuery->TGameStatus($GID)) {
$oR3DCQuery->GetTGameBoard($config, $GID, $_SESSION['sid'], $_SESSION['id'], $clrl, $clrd);
if ($oR3DCQuery->IsPlayersTurn($config, $_SESSION['id'], $GID)) {
//echo "Its, ".$_SESSION['user']." turn to play.";
echo str_replace("['user']", $_SESSION['user'], GetStringFromStringTable("IDS_TGAME_TXT_3", $config));
}
} else {
echo "<br>" . GetStringFromStringTable("IDS_TGAME_TXT_3", $config) . "";
}
}
$oR3DCQuery->Close();
unset($oR3DCQuery);
} else {
//Instantiate theCR3DCQuery Class
$oR3DCQuery = new CR3DCQuery($config);
if ($oR3DCQuery->TimeForTGame($config, $GID) == false) {
echo "<br>" . GetStringFromStringTable("IDS_TGAME_TXT_1", $config) . "";
} else {
if ($oR3DCQuery->TGameStatus($GID)) {
$oR3DCQuery->GetTGameBoard($config, $GID, "", 0, $clrl, $clrd);
} else {
echo "<br>" . GetStringFromStringTable("IDS_TGAME_TXT_2", $config) . "";
}
}
$oR3DCQuery->Close();
unset($oR3DCQuery);
}
?>
</body>
</html>
示例2: elseif
window.location.reload(true)
}
}
window.onload=starttime
<?php
////////////
//Instantiate theCR3DCQuery Class
$oR3DCQuery = new CR3DCQuery($config);
if ($oR3DCQuery->IsPlayersTurn($config, $_SESSION['id'], $GID) && $oR3DCQuery->TimeForTGame($config, $GID)) {
echo "parent.frames['chessboard'].location.reload();";
} elseif ($oR3DCQuery->IsPlayersTurn($config, $_SESSION['id'], $GID) == false && $oR3DCQuery->TimeForTGame($config, $GID) == false) {
echo "parent.frames['chessboard'].location.reload();";
} elseif ($oR3DCQuery->TGameStatus($GID) == false) {
echo "parent.frames['chessboard'].location.reload();";
}
$oR3DCQuery->Close();
unset($oR3DCQuery);
///////////
?>
</script>
<body>
<textarea cols='32' rows='24' class='post'>
<?php
//Instantiate theCR3DCQuery Class
$oR3DCQuery = new CR3DCQuery($config);
示例3:
$cmdResign = $_GET['cmdResign'];
if ($cmdResign != "") {
if ($isblack) {
$oR3DCQuery->UpdateGameStatus($config, $gid, "C", "W");
} else {
$oR3DCQuery->UpdateGameStatus($config, $gid, "C", "B");
}
}
$oR3DCQuery->Close();
unset($oR3DCQuery);
$txtmovefrom = $_GET['txtmovefrom'];
$txtmoveto = $_GET['txtmoveto'];
if (isset($_SESSION['sid']) && isset($_SESSION['user']) && isset($_SESSION['id']) && $GID != "" && $txtmovefrom != "" && $txtmoveto != "") {
//Instantiate theCR3DCQuery Class
$oR3DCQuery = new CR3DCQuery($config);
if ($oR3DCQuery->IsPlayersTurn($config, $_SESSION['id'], $GID) && $oR3DCQuery->TimeForTGame($config, $GID) && $oR3DCQuery->TGameStatus($GID)) {
$movestr2 = $txtmovefrom . "-" . $txtmoveto;
// get the fen for the game
$fen = $oR3DCQuery->GetHackedFEN($_SESSION['sid'], $GID);
//check to see if the move is valid
if (is_Move_legal($fen, $movestr2)) {
//if ! promotion screen
if (!($move_promotion_figur && strlen($movestr2) == 5)) {
$Move = $txtmovefrom . "," . $txtmoveto;
$oR3DCQuery->CurrentGameMovePiece($config, $gid, $_SESSION['sid'], $_SESSION['id'], $Move);
//checkmate
if (get_GameState() == 1) {
if ($w_player_id == $_SESSION['id']) {
$oR3DCQuery->UpdateGameStatus($config, $gid, "C", "B");
$bmove_error = false;
} else {