3 require_once('custom.php');
4 require_once('token.php');
5 require_once('ipcheck.php');
10 $numargs = func_num_args();
14 $vstup = func_get_arg(0);
17 $current_val = func_get_arg($current);
19 foreach ($vstup as $v) {
20 if ($v == $currentval) {
22 if ($current > $numargs) {
25 $current_val = func_get_arg($current);
31 function parse_keys($klice_str)
34 $keys_nums = preg_match_all('/\b\d+\b/', $klice_str, $keys);
37 foreach ($keys[0] as $k) {
38 // echo "<br />klic" . intval($k); // DEBUG
39 $klice[] = intval($k);
44 function ohodnot_hrace($klice_str)
46 $klice = parse_keys($U['klice']);
48 $U['perky'] = vyhodnot_klice($klice);
50 if(!over_platnost($U)) {
55 $U['skore'] = spocti_skore($U, $klice);
59 * Vrati pole obsahujici klice vstupniho pole, ktere maji hodnotu true.
62 * $v = array( 1=>true, 2=>false, 13=>true);
63 * $res = array_keys_true($v);
64 * // $res == array(1, 13);
66 function array_keys_true($keys)
69 foreach ($keys as $k => $v) {