log points to calculate classifics
authorMatteo Nastasi (mop) <nastasi@alternativeoutput.it>
Wed, 22 Jul 2009 19:13:32 +0000 (19:13 +0000)
committerMatteo Nastasi (mop) <nastasi@alternativeoutput.it>
Wed, 22 Jul 2009 19:13:32 +0000 (19:13 +0000)
web/briskin5/index_wr.php

index 376d5ff..1ed5e59 100644 (file)
@@ -454,14 +454,20 @@ else if ($user->stat == 'table') {
        if ($table->turn == (BRISKIN5_PLAYERS_N * 8)) { /* game finished */
          log_wr(sprintf("GIOCO FINITO !!!"));
 
-          $plist = "$table->table_token|$user->table|$table->player_n";
-          $curtime = time();
-          log_legal($curtime, $user, "STAT:FINISH_GAME", $plist);
 
          /* ************************************************ */
          /*    PRIMA LA PARTE PER LO SHOW DI CHI HA VINTO    */
          /* ************************************************ */
-         calculate_points(&$table);
+         $pt_cur = calculate_points(&$table);
+
+          $plist = "$table->table_token|$user->table_orig|$table->player_n";
+          $curtime = time();
+          for ($i = 0 ; $i < BRISKIN5_PLAYERS_N ; $i++) {
+            $user_cur = &$bri->user[$table->player[$i]];
+            $plist .= '|'.xcapelt($user_cur->name).'|'.$pt_cur[$i];
+          }
+          log_legal($curtime, $user, "STAT:BRISKIN5:FINISH_GAME", $plist);
+          log_points($curtime, $user, "STAT:BRISKIN5:FINISH_GAME", $plist);
 
          $table->game_next();
          $table->game_init(&$bri->user);