本文整理匯總了PHP中CR3DCQuery::GetActualFEN方法的典型用法代碼示例。如果您正苦於以下問題:PHP CR3DCQuery::GetActualFEN方法的具體用法?PHP CR3DCQuery::GetActualFEN怎麽用?PHP CR3DCQuery::GetActualFEN使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類CR3DCQuery
的用法示例。
在下文中一共展示了CR3DCQuery::GetActualFEN方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: unset
}
break;
////////////////////////////////////////////////////////////////////////////////////////////
// FEN
// Params: action, sid, gameid
////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////
// FEN
// Params: action, sid, gameid
////////////////////////////////////////////////////////////////////////////////////////////
case "fen":
if (isSessionIDValid($config, $xsid)) {
if ($_GET['gameid'] != "") {
//Instantiate the CR3DCQuery Class
$oR3DCQuery = new CR3DCQuery($config);
$fen = $oR3DCQuery->GetActualFEN($xsid, $_GET['gameid']);
$oR3DCQuery->Close();
unset($oR3DCQuery);
echo "<RESPONSE>\n";
echo "<FEN>" . $fen . "</FEN>\n";
echo "</RESPONSE>\n";
} else {
echo "<RESPONSE>\n";
echo "<FEN></FEN>\n";
echo "</RESPONSE>\n";
}
} else {
echo "<RESPONSE>\n";
echo "<ERROR>ID_SESSION_ID_INVALID</ERROR>\n";
echo "</RESPONSE>\n";
}
示例2: explode
}
$blackdiv = "\n\t<div id=\"blackclock\"></div>\n\t<div class=\"avatar\">{$image}</div>\n\t<div class=\"userid\">{$userid}</div>\n\t<div class=\"points\">{$points}</div>\n\t";
//check the current player's color. set the location of player information accordingly. i.e if the player is black, black player's information is diplayed at the bottom and vice versa
if ($oR3DCQuery->IsPlayerBlack($config, $gid, $_SESSION['id'])) {
$player = 'black';
$tdiv = $whitediv;
$bdiv = $blackdiv;
$imgc = 'b';
} else {
$player = 'white';
$bdiv = $whitediv;
$tdiv = $blackdiv;
$imgc = 'w';
}
//get the current FEN data
$fen = explode(" ", $oR3DCQuery->GetActualFEN($_SESSION['sid'], $gid));
//set the turn
if ($fen[1] == 'w') {
$turn = 'white';
} else {
$turn = 'black';
}
//explode the board info into rows
$board = explode("/", $fen[0]);
$initiator = "";
$w_player_id = "";
$b_player_id = "";
$status = "";
$completion_status = "";
$start_time = "";
$next_move = "";