5 * Copyright (C) 2017 Matteo Nastasi
6 * mailto: nastasi@alternativeoutput.it
7 * matteo.nastasi@milug.org
8 * web: http://www.alternativeoutput.it
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
15 * This program is distributed in the hope that it will be useful, but
16 * WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABLILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * General Public License for more details. You should have received a
19 * copy of the GNU General Public License along with this program; if
20 * not, write to the Free Software Foundation, Inc, 59 Temple Place -
21 * Suite 330, Boston, MA 02111-1307, USA.
25 require_once("briskin5.phh");
27 $mlang_bin5_rules = array(
28 // br, hr, b, /b, win, fri
29 'info_part' => array( 'it' => 'Ha chiamato %3$s%5$s%4$s, il socio era %3$s%6$s%4$s,%1$s',
30 'en' => 'The declarer was %3$s%5$s%4$s, the partner was %3$s%6$s%4$s,%1$s'),
32 'info_capp' => array( 'it' => 'hanno fatto %3$scappotto%4$s EBBRAVI!.%1$s',
33 'en' => 'and they made %3Dscapot%4$s WELL DONE!.%1$s'),
35 // br, hr, b, /b, old_asta_pnt, old_pnt, winornot
36 'info_alea' => array( 'it' => 'dovevano fare %3$salmeno %5$d%4$s punti e ne hanno fatti %3$s%6$d%4$s: hanno %7$s.%1$s',
37 'en' => 'they had to do %3$sat least %5$d%4$s points and they had made %3$s%6$d%4$s: they have %7$s.%1$s'),
38 // br, hr, b, /b, old_pnt, winornot
39 'info_more' => array( 'it' => 'dovevano fare %3$spiù di 60%4$s punti e ne hanno fatti %3$s%5$d%4$s: hanno %6$s.%1$s',
40 'en' => 'they had to do %3$sover 60%4$s points and they had made %3$s%5$d%4$s: they have %3$s%6$s%4$s.%1$s'),
41 'info_win' => array( 'it' => 'vinto',
43 'info_peer' => array( 'it' => 'pareggiato',
45 'info_lost' => array( 'it' => 'perso',
48 // br, hr, b, /b, win_name
49 'info_alon' => array( 'it' => '%3$s%5$s%4$s si è chiamato in mano,%1$s',
50 'en' => '%3$s%5$s%4$s play alone against each other,%1$s'),
51 // br, hr, b, /b, old_asta_pnt, old_pnt, winornot
52 'info_aleaa' => array( 'it' => 'doveva fare %3$salmeno %5$d%4$s punti e ne ha fatti %3$s%6$d%4$s: ha %3$s%7$s%4$s.%1$s',
53 'en' => 'he/she had to do %3$sat least %5$d%4$s points and they had made %3$s%6$d%4$s: he/she had %3$s%7$s%4$s.%1$s'),
54 // br, hr, b, /b, old_pnt, winornot
55 'info_morea' => array( 'it' => 'doveva fare %3$spiù di 60%4$s punti e ne ha fatti %3$s%5$d%4$s: ha %3$s%6$s%4$s.%1$s',
56 'en' => 'he/she had to do %3$smore than 60%4$s points and they had made %3$s%5$d%4$s: he/she had %3$s%6$s%4$s.%1$s'),
58 'info_acap' => array( 'it' => 'ha fatto %3$scappotto%4$s EBBRAVO!.%1$s',
59 'en' => 'and he/she made %3$scapot%4$s WELL DONE!.%1$s'),
62 'info_omul' => array( 'it' => '%1$sLa partita valeva %3$s%5$s%4$s.%1$s',
63 'en' => '%1$sEN: The game was worth %3$s%5$s%4$s.%1$s' ),
66 'info_alpa' => array( 'it' => '%1$sHanno passato %3$stutti%4$s.%1$s',
67 'en' => '%1$sEN: Hanno passato %3$stutti%4$s.%1$s' ),
69 // br, hr, b, /b, aband-name
70 'info_aban' => array( 'it' => ' Ha lasciato %3$s%5$s%4$s perché aveva al massimo %3$s2 punti%4$s.',
71 'en' => ' EN: Ha lasciato %3$s%5$s%4$s perché aveva al massimo %3$s2 punti%4$s.')
74 abstract class Rules {
78 abstract function engine(&$bri, $curtime, $action, $user);
80 function __construct($table)
82 $this->table = $table;
90 function tourn_points(&$user, $i)
95 function tourn_points_max($user)