projects
/
e-DoKo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
824d4e4
)
added some debugging functionality
author
arun
<arun@nubati.net>
Sat, 18 Nov 2006 11:08:23 +0000
(11:08 +0000)
committer
arun
<arun>
Sat, 18 Nov 2006 11:08:23 +0000
(11:08 +0000)
index.php
patch
|
blob
|
history
diff --git
a/index.php
b/index.php
index 247241c589d07cc764801b8ba657a1bc47d293ac..162656eb966568f87a54942959f24c940d30dd03 100644
(file)
--- a/
index.php
+++ b/
index.php
@@
-15,7
+15,7
@@
function mymail($To,$Subject,$message)
{
$debug = 1;
if($debug)
{
$debug = 1;
if($debug)
- echo "<br>To: $To<br>Subject: $
s
ubject <br>$message<br>";
+ echo "<br>To: $To<br>Subject: $
S
ubject <br>$message<br>";
else
mail($To,$Subject,$message);
return;
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;
$history[]=$win.":\n";
/* count points of the last trick */
$points=0;
- echo "<br>".$history[sizeof($history)-2]."is the last trick played<br>";
+
$tmp = explode(":",$history[sizeof($history)-2]);
for($i=0;$i<4;$i++)
{
$tmp2 = explode("->",$tmp[$i]);
$c = $tmp2[1];
$points += card_value($c);
$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)."<br>";
}
$player[$hash[$win]]["points"]+=$points;
echo "<br> ".$player[$hash[$win]]["name"]." won: $points Points <br>";
}
$player[$hash[$win]]["points"]+=$points;
echo "<br> ".$player[$hash[$win]]["name"]." won: $points Points <br>";
@@
-689,7
+688,7
@@
if(sizeof($lines)<2)
if(sizeof($tmp)==2 && strlen($tmp[0])==1)
{
$next=$tmp[0];
if(sizeof($tmp)==2 && strlen($tmp[0])==1)
{
$next=$tmp[0];
- echo "
found the start of a new trick at $next
<br>";
+ echo "
DEBUG: the next move is for <a href=\"index.php?me=".$hash[$next].">the next player</a>
<br>";
if(strlen(trim($player[$me]["cards"]))==0)
{
echo "<br> game over, count points <br>";
if(strlen(trim($player[$me]["cards"]))==0)
{
echo "<br> game over, count points <br>";