From: arun Date: Sat, 18 Nov 2006 11:08:23 +0000 (+0000) Subject: added some debugging functionality X-Git-Url: https://git.nubati.net/cgi-bin/gitweb.cgi?p=e-DoKo.git;a=commitdiff_plain;h=9632b3bc79abf72a127c4967ccc01663e0020481 added some debugging functionality --- diff --git a/index.php b/index.php index 247241c..162656e 100644 --- a/index.php +++ b/index.php @@ -15,7 +15,7 @@ function mymail($To,$Subject,$message) { $debug = 1; if($debug) - echo "
To: $To
Subject: $subject
$message
"; + echo "
To: $To
Subject: $Subject
$message
"; else mail($To,$Subject,$message); return; @@ -651,14 +651,13 @@ if(sizeof($lines)<2) $history[]=$win.":\n"; /* count points of the last trick */ $points=0; - echo "
".$history[sizeof($history)-2]."is the last trick played
"; + $tmp = explode(":",$history[sizeof($history)-2]); for($i=0;$i<4;$i++) { $tmp2 = explode("->",$tmp[$i]); $c = $tmp2[1]; $points += card_value($c); - echo "adding card value ".card_value($c)."
"; } $player[$hash[$win]]["points"]+=$points; echo "
".$player[$hash[$win]]["name"]." won: $points Points
"; @@ -689,7 +688,7 @@ if(sizeof($lines)<2) if(sizeof($tmp)==2 && strlen($tmp[0])==1) { $next=$tmp[0]; - echo "found the start of a new trick at $next
"; + echo "DEBUG: the next move is for the next player
"; if(strlen(trim($player[$me]["cards"]))==0) { echo "
game over, count points
";