X-Git-Url: https://git.nubati.net/cgi-bin/gitweb.cgi?p=e-DoKo.git;a=blobdiff_plain;f=functions.php;h=af0cc8eef61ddd92e314852421e3ec5a186ca4ed;hp=b1ed09fabf0c5df3f92be136aa2bd0042845748d;hb=42aae8a38789ec102478db6dc58795c4b095546e;hpb=e7e64b1ada481710704c16bfb8ee4a7c337dc8f1
diff --git a/functions.php b/functions.php
index b1ed09f..af0cc8e 100644
--- a/functions.php
+++ b/functions.php
@@ -58,6 +58,9 @@ function mymail($To,$Subject,$message,$header="")
if($debug)
{
+ /* display email on screen,
+ * change txt -> html
+ */
$message = str_replace("\n","
\n",$message);
$message = ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]",
"\\0", $message);
@@ -157,11 +160,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 +180,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 */
@@ -640,7 +648,7 @@ function can_call($what,$hash)
function display_table ()
{
- global $gameid, $GT, $debug,$host,$defaulttimezone;
+ global $gameid, $GT, $debug,$INDEX,$defaulttimezone;
$result = mysql_query("SELECT User.fullname as name,".
" Hand.position as position, ".
@@ -677,7 +685,7 @@ function display_table ()
if(!$debug)
echo " $name \n";
else
- echo " $name\n";
+ echo " $name\n";
/* add hints for poverty, wedding, solo, etc */
if($GT=="poverty" && $party=="re")
@@ -785,9 +793,9 @@ function display_table ()
function display_user_menu()
{
- global $wiki,$myid,$host;
+ global $WIKI,$myid,$INDEX,$STATS;
echo "