本文整理汇总了PHP中Render::player_text方法的典型用法代码示例。如果您正苦于以下问题:PHP Render::player_text方法的具体用法?PHP Render::player_text怎么用?PHP Render::player_text使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Render
的用法示例。
在下文中一共展示了Render::player_text方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: render_game
public function render_game($game, $start_hand = false, $controls = true)
{
$i = 0;
foreach ($game->players as $player) {
$alt_seat = $i == 0 ? 1 : 0;
$render = array('game_id' => $game->id, 'game-' . $game->id . '-player_cards' => Render::player_cards($game, '', $player), 'game-' . $game->id . '-player_text' => Render::player_text($game, '', $player), 'game-' . $game->id . '-opponent_cards' => Render::player_cards($game, $alt_seat), 'game-' . $game->id . '-opponent_text' => Render::player_text($game, $alt_seat), 'game-' . $game->id . '-community_cards' => Render::community_cards(), 'game-' . $game->id . '-pot' => '<b>Pot: $' . $game->get_pot_value() . '</b>');
if ($game->current_turn == $i && $controls) {
$render['game-' . $game->id . '-game_controls'] = Render::game_actions($game, $player);
}
$this->send_to_one($player->client_id, 'game_render', $render);
if ($start_hand) {
// send their cards to the game log
$this->send_to_one($player->client_id, 'game_log', array('game_id' => $game->id, 'msgs' => array('<b>You were dealt:</b> ' . Render::player_cards($game, $i, $player))));
}
$i++;
}
}