BUGFIX: a comment for schweinchen was issued even in solo games without schweinchen
[e-DoKo.git] / functions.php
index 0ce3104701f2175c24d53f6e63053904ba8846d7..d083593abfcb3117be7fc82f75eac138dff7925b 100644 (file)
@@ -157,11 +157,12 @@ function compare_cards($a,$b,$game)
   if( $b/2 - (int)($b/2) != 0.5)
     $b--;
 
-  /* some special cases */
+  /* check for schweinchen and ten of hearts*/
   switch($game)
     {
     case "normal":
     case "silent":
+    case "trump":
       if($RULES["schweinchen"]=="both" && $GAME["schweinchen"])
        {
          if($a == 19 || $a == 20 )
@@ -176,13 +177,17 @@ function compare_cards($a,$b,$game)
          if($b == 19 || $b == 20 )
            return 0;
        };
-    case "trump":
     case "heart":
     case "spade":
     case "club":
+      /* check for ten of hearts rule */
       if($RULES["dullen"]=="secondwins")
        if($a==1 && $b==1) /* both 10 of hearts */
          return 0;        /* second one wins.*/
+    case "trumpless":
+    case "jack":
+    case "queen":
+      /* no special cases here */
     }
 
   /* normal case */
@@ -785,7 +790,7 @@ function display_table ()
 
 function display_user_menu()
 {
-  global $wiki,$myid,$INDEX,$STATS;
+  global $WIKI,$myid,$INDEX,$STATS;
   echo "<div class=\"usermenu\">\n".
     "<a href=\"".$INDEX."\"> Go to my user page </a>";
 
@@ -808,7 +813,7 @@ function display_user_menu()
   echo "<hr /> <a href=\"".$STATS."\">Statistics</a>\n";
 
   echo
-    "<hr />Report bugs in the <a href=\"".$wiki."\">wiki</a>\n";
+    "<hr />Report bugs in the <a href=\"".$WIKI."\">wiki</a>\n";
   echo  "</div>\n";
   return;
 }