summaryrefslogtreecommitdiffstats
path: root/functions.php
diff options
context:
space:
mode:
authorarun <arun@nubati.net>2007-04-22 20:46:14 +0000
committerarun <arun>2007-04-22 20:46:14 +0000
commit3f0e64bb007762df358925569e980a7718ff033d (patch)
treee6660044f3e70866415862abedc78f04e04751ee /functions.php
parent0d893195c646305741d6a7f80b4b31343a6e8153 (diff)
downloade-DoKo-3f0e64bb007762df358925569e980a7718ff033d.tar.gz
e-DoKo-3f0e64bb007762df358925569e980a7718ff033d.tar.bz2
e-DoKo-3f0e64bb007762df358925569e980a7718ff033d.zip
debugging was on for creating the hands -> no random numbers
Diffstat (limited to 'functions.php')
-rw-r--r--functions.php20
1 files changed, 11 insertions, 9 deletions
diff --git a/functions.php b/functions.php
index cfddbce..a8cdea8 100644
--- a/functions.php
+++ b/functions.php
@@ -420,14 +420,9 @@ function create_array_of_random_numbers()
$r = array();
$a = array();
- for($i=0;$i<48;$i++)
- $a[$i]=$i+1;
-
- if(!$debug)
- $r = array_rand($a,48);
- else
+ if($debug)
{
- $a[ 0]=1; $a[12]=47; $a[24]=13; $a[36]=37;
+ $a[ 0]=1; $a[12]=47; $a[24]=13; $a[36]=37;
$a[ 1]=2; $a[13]=48; $a[25]=14; $a[37]=38;
$a[ 2]=3; $a[14]=27; $a[26]=15; $a[38]=39;
$a[ 3]=4; $a[15]=16; $a[27]=28; $a[39]=40;
@@ -439,9 +434,16 @@ function create_array_of_random_numbers()
$a[ 9]=10; $a[21]=46; $a[33]=22; $a[45]=34;
$a[10]=11; $a[22]=35; $a[34]=23; $a[46]=25;
$a[11]=12; $a[23]=36; $a[35]=24; $a[47]=26;
+
+ $r = $a;
}
-
- $r =$a;
+ else
+ {
+ for($i=0;$i<48;$i++)
+ $a[$i]=$i+1;
+
+ $r = array_rand($a,48);
+ };
return $r;
}