\n".
- "This game is part of session $session: \n";
+ echo "
\n";
+ echo "
Rules (+icons fur rules) \n";
+ echo "
\n";
+ echo " 10ofhearts : ".$RULES["dullen"] ."
\n";
+ echo " schweinchen: ".$RULES["schweinchen"] ."
\n";
+ echo " call: ".$RULES["call"] ."
\n";
+ echo "
\n
\n";
+ echo "
Score \n";
+ $score = generate_score_table($session);
+ echo format_score_table_html($score,$myid);
+ echo "
\n";
$hashes = DB_get_hashes_by_session($session,$myid);
$i = 1;
foreach($hashes as $hash)
{
- if($hash == $me)
- echo "$i \n";
- else
- echo "
$i \n";
- $i++;
+ if($hash == $me)
+ $j=$i;
+ $i++;
+ $lasthash=$hash;
}
+ $i--;
+ echo "This is game number $j of
$i in session $session.";
echo "
\n";
}
@@ -155,7 +165,7 @@ switch($mystatus)
else
{
/* check the result, if player wants to join, got next stage, else cancel game */
- if($_REQUEST["in"] == "no" && !$skip)
+ if(!$skip && $_REQUEST["in"] == "no" )
{
/* cancel the game */
$message = "Hello, \n\n".
@@ -214,7 +224,7 @@ switch($mystatus)
DB_set_player_by_gameid($gameid,$who);
$message = "It's your turn now in game ".DB_format_gameid($gameid).".\n".
- "Use this link to go the game: ".$HOST.$INDEX."?action=game&me=".$hash."\n\n" ;
+ "Use this link to go the game: ".$HOST.$INDEX."?action=game&me=".$hash."\n\n" ;
mymail($email,$EmailName."ready, set, go... (game ".DB_format_gameid($gameid).") ",$message);
*/
}
@@ -1045,7 +1055,7 @@ switch($mystatus)
"WHERE Trick.game_id='".$gameid."' ".
"GROUP BY Trick.id, sequence ".
"ORDER BY Trick.id, sequence ASC");
- $trickNR = 1;
+ $trickNR = 0;
$lasttrick = DB_get_max_trickid($gameid);
$play = array(); /* needed to calculate winner later */
@@ -1061,7 +1071,7 @@ switch($mystatus)
if($mygametype != 'normal' && $mygametype != 'silent') /* only show when needed */
{
echo "
Pre\n".
- " \n";
+ "
\n";
$show = 1;
for($mypos=1;$mypos<5;$mypos++)
{
@@ -1089,6 +1099,10 @@ switch($mystatus)
$comment = $r[4];
$user = $r[6];
+ /* count number of tricks */
+ if($seq==1)
+ $trickNR++;
+
/* check if first schweinchen has been played */
if( $GAME['schweinchen-who'] && ($r[0] == 19 || $r[0] == 20) )
if(!$GAME['schweinchen-first'])
@@ -1136,7 +1150,6 @@ switch($mystatus)
/* end of trick? */
if($seq==4)
{
- $trickNR++;
echo "
\n \n"; /* end div trick, end li trick */
}
}
@@ -1646,35 +1659,9 @@ switch($mystatus)
$session = DB_get_session_by_gameid($gameid);
$score = generate_score_table($session);
- /* convert html to ascii */
- $score = str_replace("
\n
\n \n","",$score);
- $score = str_replace("
\n","",$score);
- $score = str_replace("\n","",$score);
- $score = str_replace(array("
","
","
"," | "),array("","\n","","|"),$score);
- $score = explode("\n",$score);
-
- $header = array_slice($score,0,1);
- $header = explode("|",$header[0]);
- for($i=0;$i
5) $header.= " ... \n";
-
- if(sizeof($score)>5) $score = array_slice($score,-5,5);
- for($i=0;$i\n";
}
- if($seq!=4 && $trickNR>1)
+ if($seq!=4 && $trickNR>=1)
echo " \n \n"; /* end div trick, end li trick */
/* display points in case game is over */
@@ -1736,13 +1723,14 @@ switch($mystatus)
}
echo "
prev\n";
- echo "
next\n\n"; /* end ul tricks*/
+ echo "
next\n";
+ echo "\n"; /* end ul tricks*/
echo "
Personal notes:
\n";
$notes = DB_get_notes_by_userid_and_gameid($myid,$gameid);
foreach($notes as $note)
echo "$note
\n";
- echo "Insert note:\n";
+ echo "\n";
echo " \n";
$mycards = DB_get_hand($me);
@@ -1865,15 +1853,6 @@ switch($mystatus)
/* display rule set for this game */
echo "
\n";
- if($gamestatus != 'pre')
- echo " Gametype: $GT
\n";
-
- echo "Rules:
\n";
- echo "10ofhearts : ".$RULES["dullen"] ."
\n";
- echo "schweinchen: ".$RULES["schweinchen"] ."
\n";
- echo "call: ".$RULES["call"] ."
\n";
-
- echo "
\n";
if($gamestatus == 'play' )
output_form_calls($me);
@@ -1884,15 +1863,9 @@ switch($mystatus)
if($gamestatus == 'play' || $gameend < 60*60*24*7)
{
echo "
\nA short comment:\n";
- echo "
";
}
- echo "\n
\n";
-
- $session = DB_get_session_by_gameid($gameid);
- $score = generate_score_table($session);
-
- echo $score;
+ echo "\n";
echo "\n";