本文整理汇总了PHP中Card::render_card_back方法的典型用法代码示例。如果您正苦于以下问题:PHP Card::render_card_back方法的具体用法?PHP Card::render_card_back怎么用?PHP Card::render_card_back使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Card
的用法示例。
在下文中一共展示了Card::render_card_back方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: player_cards
function player_cards($game = NULL, $position = '', $player = NULL)
{
if ($game == null) {
// we are not in an active game
return Card::render_card_space() . Card::render_card_space();
}
if (is_a($player, 'Player')) {
return $player->render_cards($game->id);
} else {
return Card::render_card_back() . Card::render_card_back();
}
}
示例2: render_cards
public function render_cards($game_id, $face_down = false)
{
if ($face_down) {
$count = $this->cards[$game_id]->count();
if ($count == 2) {
return Card::render_card_back() . Card::render_card_back();
} elseif ($count == 1) {
return Card::render_card_back() . Card::render_card_space();
} else {
return Card::render_card_space() . Card::render_card_space();
}
} else {
return $this->cards[$game_id]->render(2);
}
}