/* same as for foxes, karlchen doesn't always make sense
* check what kind of game it is and set karlchen accordingly */
- $ok = 1; /* default: karlchen should be accounted for */
- if($tricknr != 12 )
- $ok = 0; /* Karlchen works only in the last trick */
- if($ok && DB_get_gametype_by_gameid($gameid)=='solo' )
+
+ if($tricknr == 12 ) /* Karlchen works only in the last trick */
{
- $solo = DB_get_solo_by_gameid($gameid);
- if($solo == 'trumpless' || $solo == 'jack' || $solo == 'queen' )
- $ok = 0; /* no Karlchen in these solos */
- }
+ /* check for solo */
+ $solo = 'none';
+ if(DB_get_gametype_by_gameid($gameid)=='solo' )
+ $solo = DB_get_solo_by_gameid($gameid);
- if($ok)
- foreach($play as $played)
- if ( $played['card']==11 || $played['card']==12 )
- if ($played['pos'] == $winner )
- {
- /* possible caught a fox, check party */
- $uid1 = DB_get_userid('gameid-position',$gameid,$winner);
- $party1 = DB_get_party_by_gameid_and_userid($gameid,$uid1);
+ /* no Karlchen in these solos */
+ if($solo != 'trumpless' && $solo != 'jack' && $solo != 'queen' )
+ {
+ foreach($play as $played)
+ if ( $played['card']==11 || $played['card']==12 )
+ if ($played['pos'] == $winner )
+ {
+ /* save Karlchen */
+ $uid1 = DB_get_userid('gameid-position',$gameid,$winner);
+ $party1 = DB_get_party_by_gameid_and_userid($gameid,$uid1);
+
+ DB_query("INSERT INTO Score".
+ " VALUES( NULL,NULL,$gameid,'$party1',$uid1,NULL,'karlchen')");
+ };
+ };
+ }; /* end scoring Karlchen */
- DB_query("INSERT INTO Score".
- " VALUES( NULL,NULL,$gameid,'$party1',$uid1,NULL,'karlchen')");
- }
/*
* check for doppelopf (>40 points)
***********************************/
}
else if(myisset('card') && !$myturn )
{
- echo "please wait until it's your turn! <br />\n";
+ echo _("please wait until it's your turn!")."<br />\n";
}
if($seq!=4 && $trickNR>=1 && !(myisset('card') && $myturn) )
if($myturn && !myisset('card') && $mystatus=='play' )
{
echo "Hello ".$myname.", it's your turn! <br />\n";
- echo "Your cards are: <br />\n";
+ echo _('Your cards are').": <br />\n";
/* do we have to follow suite? */
$followsuit = 0;
}
else if($mystatus=='play' )
{
- echo "Your cards are: <br />\n";
+ echo _('Your cards are').": <br />\n";
foreach($mycards as $card)
display_card($card,$PREF['cardset']);
}
$oldcards = mysort($oldcards,$gametype);
if(isset($_SESSION['id']) && $myid==$_SESSION['id'])
- echo "Your cards were: <br />\n";
+ echo _('Your cards were').": <br />\n";
else
{
$name = DB_get_name('userid',$myid);
if($gamestatus == 'play' || $gameend < 60*60*24*7)
{
- echo "<br />\nA short comment:<input name=\"comment\" type=\"text\" size=\"15\" maxlength=\"100\" />\n";
+ echo "<br />\n"._('A short comment').":<input name=\"comment\" type=\"text\" size=\"15\" maxlength=\"100\" />\n";
}
-echo "<input type=\"submit\" value=\"submit\" />\n";
+echo "<input type=\"submit\" value=\""._('submit')."\" />\n";
/* has this hand been played by others? */
$other_game_ids = DB_played_by_others($gameid);