本文整理汇总了PHP中Card::render_card_space方法的典型用法代码示例。如果您正苦于以下问题:PHP Card::render_card_space方法的具体用法?PHP Card::render_card_space怎么用?PHP Card::render_card_space使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Card
的用法示例。
在下文中一共展示了Card::render_card_space方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: community_cards
public function community_cards($game = NULL)
{
if (is_a($game, 'Game')) {
return $game->render_community_cards();
} else {
return Card::render_card_space() . Card::render_card_space() . Card::render_card_space() . Card::render_card_space() . Card::render_card_space();
}
}
示例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);
}
}
示例3: render
public function render($count = 0)
{
if ($count) {
$return = '';
for ($i = 0; $i < $count; $i++) {
if (array_key_exists($i, $this->cards)) {
if (is_a($this->cards[$i], 'Card')) {
$return .= $this->cards[$i]->render();
} else {
$return .= Card::render_card_space();
}
} else {
$return .= Card::render_card_space();
}
}
} else {
foreach ($this->cards as $card) {
$return .= $card->render();
}
}
return $return;
}