debugging was on for creating the hands -> no random numbers
authorarun <arun@nubati.net>
Sun, 22 Apr 2007 20:46:14 +0000 (20:46 +0000)
committerarun <arun>
Sun, 22 Apr 2007 20:46:14 +0000 (20:46 +0000)
functions.php
index.php
output.php

index cfddbce169b54277a277b77d269c7a1ea61821cd..a8cdea8288369c2f3c22c19b58aa71d8814f80fe 100644 (file)
@@ -420,14 +420,9 @@ function  create_array_of_random_numbers()
   $r = array();
   $a = array();
   
   $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;
       $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;
       $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;
 }
 
   return $r;
 }
index 8e303ad28b12aafd9b4c6f25688e86e802a97bd9..989a54716145cd2276b2228e2103da8ae4d9c0ed 100644 (file)
--- a/index.php
+++ b/index.php
@@ -1053,6 +1053,7 @@ else if(myisset("me"))
              /* mark card as played */
              mysql_query("UPDATE Hand_Card SET played='true' WHERE hand_id='$handid' AND card_id=".
                          DB_quote_smart($card));
              /* mark card as played */
              mysql_query("UPDATE Hand_Card SET played='true' WHERE hand_id='$handid' AND card_id=".
                          DB_quote_smart($card));
+
              /* update Game timestamp */
              DB_update_game_timestamp($gameid);
 
              /* update Game timestamp */
              DB_update_game_timestamp($gameid);
 
index ed6287b06b394c0056013c76103756c5ac7491ee..edd23fb3db094e89b3f78a476ab82624394070c7 100644 (file)
@@ -333,7 +333,7 @@ function output_header()
   </head>
 <body onload="high_last();">
 <div class="header">
   </head>
 <body onload="high_last();">
 <div class="header">
-<h1> Welcome to E-Doko </h1>
+<h1> Welcome to E-Doko <sup style="color:#888;">(beta)</sup> </h1>
 </div>
 
 <?php
 </div>
 
 <?php