$GT = $gametype." ".$GT;
}
-/* do we need to worry about Schweinchen?
+/* do we need to worry about Schweinchen?
* check gametype and rules
- * if yes, figure out if someone actually has Schweinchen
+ * if yes, figure out if someone actually has Schweinchen
* save information in $GAME
*/
$ok=0;
-if( $gametype == 'normal' || $gametype == 'silent' || $gametype=='trump' )
- if( in_array($RULES['schweinchen'],array('both','second','secondaftercall')) )
- $ok=1;
+if( $gamestatus == 'pre' )
+ {
+ /* always need to use Schweinchen to figure out for example who has poverty */
+ $ok=1;
+ }
+else
+ {
+ /* in a game Schweinchen is not valid in all types of games */
+ if( $gametype == 'normal' || $gametype == 'silent' || $gametype=='trump' )
+ if( in_array($RULES['schweinchen'],array('both','second','secondaftercall')) )
+ $ok=1;
+ }
-if($ok)
+if($ok)
{
/* need to check for Schweinchen */
for($i=1;$i<5;$i++)
else
$GAME['schweinchen-second'] = 1; /* this must be the second fox */
- if($GAME['schweinchen-second']==1 && $RULES['schweinchen']=='second' )
- DB_insert_comment("Schweinchen! ",$playid,$myid);
- if($RULES['schweinchen']=='both' )
- DB_insert_comment("Schweinchen! ",$playid,$myid);
+ if( ($GAME['schweinchen-second']==1 && $RULES['schweinchen']=='second') || $RULES['schweinchen']=='both')
+ {
+ DB_insert_comment("Schweinchen! ",$playid,$myid);
+ $commentSchweinchen = "Schweinchen! ";
+ }
if ($debug)
echo "schweinchen = ".$GAME["schweinchen-who"]." ---<br />";
}
$comment = $_REQUEST["comment"];
if($comment != "")
DB_insert_comment($comment,$playid,$myid);
+ if($commentSchweinchen)
+ $comment = $commentSchweinchen . $comment;
};
/* check for note */