diff options
author | Arun Persaud <arun@nubati.net> | 2008-03-29 10:45:59 -0700 |
---|---|---|
committer | Arun Persaud <arun@nubati.net> | 2008-03-29 10:53:04 -0700 |
commit | 661cdf100d59bb0d7ee3ade0d392efa68aba1a19 (patch) | |
tree | 9e54bff0d1f392685647eba5f8a6a94a3740b087 /functions.php | |
parent | d1e0b371bfc49d0e6a73631621d7881e305f37e3 (diff) | |
download | e-DoKo-661cdf100d59bb0d7ee3ade0d392efa68aba1a19.tar.gz e-DoKo-661cdf100d59bb0d7ee3ade0d392efa68aba1a19.tar.bz2 e-DoKo-661cdf100d59bb0d7ee3ade0d392efa68aba1a19.zip |
BUGFIX: a comment for schweinchen was issued even in solo games without schweinchen
fixed the comment issue and also added trump solo to games where schweinchen will count
Signed-off-by: Arun Persaud <arun@nubati.net>
Diffstat (limited to 'functions.php')
-rw-r--r-- | functions.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/functions.php b/functions.php index 5adf4fa..d083593 100644 --- a/functions.php +++ b/functions.php @@ -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 */ |