foreach ($groups as $key => $val) { echo '[' . $players[$key] . ']  '; sort($val); $cardObj->watch_card($val); } echo '<hr>'; // 遊戲開始 $flow = new Flow(); $tab = new Table(); $flow::$members = count($players); // 第一手 $card = $flow->fire($groups); $tab->add($card); echo $players[$flow->now_player()] . ' : ' . $suit[$card] . '<br>'; for ($i = 0; $i < 55; $i++) { $flow->move_next(); $card = $flow->run($tab->get_on_table()); if (!$card) { echo '[' . $i . '] ' . $players[$flow->now_player()] . ' : PASS ! <br>'; continue; // 沒牌了 } if ($card > 0) { $tab->add($card); $show_card = $suit[$card]; } else { $tab->discard($flow->now_player(), -intval($card)); $show_card = "<font color='blue'>蓋牌 " . $suit[-intval($card)] . "</font>"; } echo '[' . $i . '] ' . $players[$flow->now_player()] . ' : ' . $show_card . '<br>'; // test