- 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));
-
- $table->game_next();
- $table->game_init(&$bri->user);
-
- for ($i = 0 ; $i < BIN5_PLAYERS_N ; $i++) {
- $user_cur = &$bri->user[$table->player[$i]];
-
- $ret = sprintf('gst.st = %d;', $user_cur->step+1);
- $ret .= show_table(&$bri,&$user_cur,$user_cur->step+1, TRUE, TRUE);
- $user_cur->comm[$user_cur->step % COMM_N] = $ret;
- $user_cur->step_inc();
+ 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)) {
+ for ($i = 0 ; $i < BIN5_PLAYERS_N ; $i++) {
+ $user_cur = &$bin5->user[$table->player[$i]];
+
+ $ret = sprintf('gst.st = %d;', $user_cur->step+1);
+ $ret .= show_table($bin5, $user_cur,$user_cur->step+1, TRUE, TRUE);
+ $user_cur->comm[$user_cur->step % COMM_N] = $ret;
+ $user_cur->step_inc();
+ }