當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Render::player_text方法代碼示例

本文整理匯總了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> &nbsp;' . Render::player_cards($game, $i, $player))));
         }
         $i++;
     }
 }
開發者ID:shinichi81,項目名稱:laravel-pkr,代碼行數:17,代碼來源:server.php


注:本文中的Render::player_text方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。