BUGFIX: displaying the player who has to move during setup
[e-DoKo.git] / functions.php
index 4f33f1e41c00019c5e569621f2193d14b2db6e03..be8897453ab574d2b0f2f4c4e9f8f52745bddf53 100644 (file)
@@ -9,7 +9,6 @@ function mymail($To,$Subject,$message,$header="")
       $message = str_replace("\n","<br />\n",$message);
       $message = ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]",
                      "<a href=\"\\0\">\\0</a>", $message);
-      //$message = ereg_replace("(http.*)[ <>]","<a href=\"\\1\">\\1 </a>",$message);
       
       echo "<br />To: $To<br />";
       if($header != "") 
@@ -277,87 +276,6 @@ function count_trump($cards)
   return $trump;
 }
 
-function card_to_name($card)
-{
-  switch($card)
-    {
-      case 1:
-      case 2:
-        return "ten of hearts";
-      case 3:
-      case 4:
-      return "queen of clubs";
-      case 5:
-      case 6:
-      return "queen of spades";
-      case 7:
-      case 8:
-      return "queen of hearts";
-      case 9:
-      case 10:
-      return "queen of diamonds";
-      case 11:
-      case 12:
-      return "jack of clubs";
-      case 13:
-      case 14:
-      return "jack of spades";
-      case 15:
-      case 16:
-      return "jack of hearts";
-      case 17:
-      case 18:
-      return "jack of diamonds";
-      case 19:
-      case 20:
-      return "ace of diamonds";
-      case 21:
-      case 22:
-      return "ten of diamonds";
-      case 23:
-      case 24:
-      return "king of diamonds";
-      case 25:
-      case 26:
-      return "nine of diamonds";;
-      case 27:
-      case 28:
-      return "ace of clubs";
-      case 29:
-      case 30:
-      return "ten of clubs";
-      case 31:
-      case 32:
-      return "king of clubs";
-      case 33:
-      case 34:
-      return "nine of clubs";
-      case 35:
-      case 36:
-      return "ace of spades";
-      case 37:
-      case 38:
-      return "ten of spades";
-      case 39:
-      case 40:
-      return "king of spades";
-      case 41:
-      case 42:
-      return "nine of spades";
-      case 43:
-      case 44:
-      return "ace of hearts";
-      case 45:
-      case 46:
-      return "king of hearts";
-      case 47:
-      case 48:
-      return "nine of hearts";
-      default:
-      return "something went wrong, please contact the admin. Error: code1. $card <br />";
-    }
-}
-
 function card_value($card)
 {
   switch($card)
@@ -688,7 +606,7 @@ function can_call($what,$hash)
   switch ($RULES["call"])
     {
     case "1st-own-card":
-      if( 4-($what/30) >= 12 - $NRcards + $offset)
+      if( 4-($what/30) >= 12 - ($NRcards + $offset))
        return 1;
       break;
     case "5th-card":