NEW FEATURE: show how often a hand has been played on the user page
authorArun Persaud <arun@nubati.net>
Sun, 19 Oct 2008 03:00:40 +0000 (20:00 -0700)
committerArun Persaud <arun@nubati.net>
Sun, 19 Oct 2008 03:00:40 +0000 (20:00 -0700)
print a number instead of "F" to indicate how often a hand has been played.

Signed-off-by: Arun Persaud <arun@nubati.net>
include/user.php

index dc963770bde30b80028e1a9602f1c690658e1f21..67c720a2b6562ecc841f39e5cae218b4ade78871 100644 (file)
@@ -111,7 +111,8 @@ else
        echo "<p>Session: <br />\n";
        echo "<span class=\"gamestatuspre\"> p </span> =  pre-game phase ";
        echo "<span class=\"gamestatusplay\">P </span> =  game in progess ";
        echo "<p>Session: <br />\n";
        echo "<span class=\"gamestatuspre\"> p </span> =  pre-game phase ";
        echo "<span class=\"gamestatusplay\">P </span> =  game in progess ";
-       echo "<span class=\"gamestatusover\">F </span> =  game finished <br />";
+       echo "<span class=\"gamestatusover\">F </span> =  game finished ";
+       echo "<span class=\"gamestatusover multi\"><a> N</a> </span> =  game finished, hand played by others too <br />";
        echo "</p>\n";
 
        $output = array();
        echo "</p>\n";
 
        $output = array();
@@ -141,7 +142,14 @@ else
            if($r[4]=='pre')
              echo "   <span class=\"gamestatuspre $Multi\"><a href=\"".$INDEX."?action=game&amp;me=".$r[0]."\">p </a></span>\n";
            else if ($r[4]=='gameover')
            if($r[4]=='pre')
              echo "   <span class=\"gamestatuspre $Multi\"><a href=\"".$INDEX."?action=game&amp;me=".$r[0]."\">p </a></span>\n";
            else if ($r[4]=='gameover')
-             echo "   <span class=\"gamestatusover $Multi\"><a href=\"".$INDEX."?action=game&amp;me=".$r[0]."\">F </a></span>\n";
+           {
+             echo "   <span class=\"gamestatusover $Multi\"><a href=\"".$INDEX."?action=game&amp;me=".$r[0]."\">";
+             if($r[5]<2)
+               echo "F ";
+             else
+               echo $r[5];
+             echo "</a></span>\n";
+           }
            else
              echo "   <span class=\"gamestatusplay $Multi\"><a href=\"".$INDEX."?action=game&amp;me=".$r[0]."\">P </a></span>\n";
            if($r[4] != 'gameover')
            else
              echo "   <span class=\"gamestatusplay $Multi\"><a href=\"".$INDEX."?action=game&amp;me=".$r[0]."\">P </a></span>\n";
            if($r[4] != 'gameover')