LAYOUT: added a CSS reset
[e-DoKo.git] / include / functions.php
index dca96409674e342e6614d0126c617eb59cfb4512..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);
 }
@@ -705,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")