$table_pos = $user->table_pos;
$ret = "table_init();";
- $ret .= $table->exitlock_show(&$bri->user, $table_pos);
+ $ret .= $table->exitlock_show($bri->user, $table_pos);
if (!$is_again) {
/* GENERAL STATUS */
- $ret .= sprintf( 'gst.st = %d; stat = "%s"; subst = "%s"; table_pos = %d;',
- $sendstep, $user->stat, $user->subst, $table_pos);
+ $user_rules = $user->rules_get();
+ $ret .= sprintf('gst.st = %d; stat = "%s"; subst = "%s"; table_pos = %d; rules_set(%d);',
+ $sendstep, $user->stat, $user->subst, $table_pos,
+ ($user_rules == BIN5_USER_CONTINUE_INIT ? $table->rules->id_get() : $user_rules));
log_rd(sprintf( 'SHOW_TABLE: gst.st = %d; stat = "%s"; subst = "%s"; table_pos = %d;', $sendstep, $user->stat, $user->subst, $table_pos));
if (($CO_bin5_pref_ring_endauct = gpcs_var('CO_bin5_pref_ring_endauct', $get, $post, $cookie)) === FALSE)
$CO_bin5_pref_ring_endauct = "";
-
-
log_wr(0, 'bin::index_wr.php: COMM: '.xcapemesg($mesg));
-
- if (($user = &$bin5->get_user($sess, &$idx)) == FALSE) {
+ if (($user = &$bin5->get_user($sess, $idx)) == FALSE) {
echo "Get User Error";
log_wr("Get User Error");
return FALSE;
}
else if ($user->subst == 'asta') {
if ($argz[0] == 'lascio') {
- // && $user->handpt <= 2) {
- /* $index_cur = $table->gstart % BIN5_PLAYERS_N; */
-
- /* log_wr(sprintf("GIOCO FINITO !!!")); */
-
- /* $table->mult += 1; */
- /* $table->old_reason = sprintf("Ha lasciato %s perché aveva al massimo 2 punti.", xcape($user->name)); */
-
- /* // Non si cambia mazzo se si abbandona la partita */
- /* $table->game_next(0); */
-
- /* if ($user->table_orig < TABLES_AUTH_N) { */
- /* require_once("../Obj/dbase_".$G_dbasetype.".phh"); */
-
- /* if (($bdb = BriskDB::create()) != FALSE) { */
- /* $bdb->bin5_points_save($curtime, $table, $user->table_orig, $ucodes, $pt_cur); */
- /* unset($bdb); */
- /* } */
- /* else { */
- /* log_points($remote_addr, $curtime, $user, "STAT:BRISKIN5:FINISH_GAME", "DATABASE CONNECTION FAILED"); */
- /* } */
- /* log_points($curtime, $user, "STAT:BRISKIN5:FINISH_GAME", $plist); */
- /* } */
-
- /* $table->game_init(&$bin5->user); */
-
- if ($table->rules_engine($bin5, $curtime, BIN5_RULES_ABANDON, $user)) {
- if ($table->rules->engine(&$bin5, $curtime, BIN5_RULES_ABANDON, $user)) {
++ if ($table->rules->engine($bin5, $curtime, BIN5_RULES_ABANDON, $user)) {
for ($i = 0 ; $i < BIN5_PLAYERS_N ; $i++) {
$user_cur = &$bin5->user[$table->player[$i]];
if ($table->turn == (BIN5_PLAYERS_N * BIN5_CARD_HAND)) { /* game finished */
log_wr(sprintf("GIOCO FINITO !!!"));
- if ($table->rules_engine($bin5, $curtime, BIN5_RULES_FINISH, $user)) {
- if ($table->rules->engine(&$bin5, $curtime, BIN5_RULES_FINISH, $user)) {
++ if ($table->rules->engine($bin5, $curtime, BIN5_RULES_FINISH, $user)) {
for ($i = 0 ; $i < BIN5_PLAYERS_N ; $i++) {
$user_cur = &$bin5->user[$table->player[$i]];
- $retar[$i] .= show_table(&$bin5,&$user_cur,$user_cur->step+1,TRUE, TRUE);
+ $retar[$i] .= show_table($bin5, $user_cur, $user_cur->step+1, TRUE, TRUE);
}
}
}