some small bugfixes
[e-DoKo.git] / functions.php
index 2077d0019ac98ce2287c41a861726b4b6ce262e8..221bea8f2d028d2ad6066e1a13928503b5b2c9cb 100644 (file)
@@ -26,8 +26,8 @@ function myisset()
   foreach($args as $arg)
     {
       $ok = $ok * isset($_REQUEST[$arg]);
-      /* echo "$arg: ok = $ok <br />";
-       */
+      /*echo "$arg: ok = $ok <br />";
+       */ 
     }
   return $ok;
 }
@@ -156,14 +156,12 @@ function get_winner($p,$mode)
   $c3 = $p[3];
   $c4 = $p[4];
 
-  /* find out who won */
-
   /* first card is better than all the rest */
   if( compare_cards($c1,$c2,$mode) && compare_cards($c1,$c3,$mode) && compare_cards($c1,$c4,$mode) )
     return 1; 
 
   /* second card is better than first and better than the rest */
-  if( !compare_cards($c1,$c2,$mode) && compare_cards($c2,$c3,$mode) && compare_cards($c2,$c4,$mode) )
+  if( !compare_cards($c1,$c2,$mode) &&  compare_cards($c2,$c3,$mode) && compare_cards($c2,$c4,$mode) )
     return 2;
 
   /* third card is better than first card and better than last */
@@ -365,7 +363,7 @@ function card_value($card)
     case 48:                  
       return 0;
     default:
-      echo "something went wrong, please contact the admin. ErrorCode: 2<br>";
+      echo "something went wrong, please contact the admin. ErrorCode: 2 - $card<br>";
       return 0;
     }
 }