LAYOUT: added a CSS reset
[e-DoKo.git] / include / functions.php
index 31f9ba8e1c94ee4085e6d437fd21a0ac2681b551..bbffe00057617ae6c3f2e0e51b108b2ea765cbed 100644 (file)
@@ -171,14 +171,14 @@ function compare_cards($a,$b,$game)
     case "normal":
     case "silent":
     case "trump":
-      if($RULES["schweinchen"]=="both" && $GAME["schweinchen"])
+      if($RULES['schweinchen']=='both' && $GAME['schweinchen-who'])
        {
          if($a == 19 || $a == 20 )
            return 1;
          if($b == 19 || $b == 20 )
            return 0;
        };
-      if($RULES["schweinchen"]=="second" && $GAME["schweinchen"]==3)
+      if($RULES['schweinchen']=='second' && $GAME['schweinchen-second'])
        {
          if($a == 19 || $a == 20 )
            return 1;
@@ -572,7 +572,7 @@ function sort_comp($a,$b)
 
   $ALL = array();
   $ALL = array_merge($CARDS["trump"],$CARDS["diamonds"],$CARDS["clubs"],
-                    $CARDS["hearts"],$CARDS["spades"],$CARDS["diamonds"]);
+                    $CARDS["hearts"],$CARDS["spades"]);
 
   return pos_array($a,$ALL)-pos_array($b,$ALL);
 }
@@ -664,6 +664,7 @@ function can_call($what,$hash)
 function display_table ()
 {
   global $gameid, $GT, $debug,$INDEX,$defaulttimezone;
+  global $RULES,$GAME,$gametype;
 
   $result = DB_query("SELECT  User.fullname as name,".
                     "        Hand.position as position, ".
@@ -704,7 +705,7 @@ function display_table ()
 
       /* add hints for poverty, wedding, solo, etc */
       if( $gametype != "solo")
-       if($GAME["schweinchen"] && $RULES["schweinchen"]=="both" && $GAME["schweinchen-who"]==$hash)
+       if( $RULES["schweinchen"]=="both" && $GAME["schweinchen-who"]==$hash )
          echo " Schweinchen. <br />";
 
       if($GT=="poverty" && $party=="re")