X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=web%2Fbriskin5%2Findex_wr.php;h=c9b5b80e90d773bd0658b059b35a09d3c4a4ddce;hb=db12d769481823f4c744ce0e3a50404cc6b01cd1;hp=e0bd91e374011d3836b4794aead6e5c0d016e64d;hpb=c7ea164705798e0487508067997fb06420c9ef0c;p=brisk.git diff --git a/web/briskin5/index_wr.php b/web/briskin5/index_wr.php index e0bd91e..c9b5b80 100644 --- a/web/briskin5/index_wr.php +++ b/web/briskin5/index_wr.php @@ -110,7 +110,7 @@ function bin5_index_wr_main(&$bin5, $remote_addr_full, $get, $post, $cookie) $user->step_inc(); } else if ($argz[0] == 'chatt') { - $bin5->chatt_send(&$user,$mesg); + $bin5->chatt_send(&$user, $mesg); } else if ($argz[0] == 'preferences_update') { log_wr("PER DI PREFERENCES_UPDATE"); @@ -364,8 +364,18 @@ function bin5_index_wr_main(&$bin5, $remote_addr_full, $get, $post, $cookie) if ($table->asta_win > -1 && $user->table_pos == $table->asta_win) { $a_brisco = $argz[1]; - if ($a_brisco >= 0 && $a_brisco < 40) { + if ($a_brisco >= 0 && $a_brisco < (BIN5_CARD_HAND * BIN5_PLAYERS_N)) { $table->briscola = $a_brisco; + + $tourn_values = array(11, 10, 4,3,2, 1,1,1,1,1); + $table->tourn_pts = 0; + $seed = $a_brisco - ($a_brisco % 10); + for ($i = $seed ; $i < ($seed + 10) ; $i++) { + if ($table->card[$i]->owner == $table->asta_win) { + $table->tourn_pts += $tourn_values[$i - $seed]; + } + } + $table->friend = $table->card[$a_brisco]->owner; log_wr("GSTART 2"); $table->gstart = ($table->mazzo+1) % BIN5_PLAYERS_N;