本文整理汇总了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 = "";