*
* This file is part of e-DoKo.
*
* e-DoKo is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* e-DoKo is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with e-DoKo. If not, see .
*
*/
/* make sure that we are not called from outside the scripts,
* use a variable defined in config.php to check this
*/
if(!isset($HOST))
exit;
/* functions which only ouput html */
function output_ask_for_new_game($playerA,$playerB,$playerC,$playerD,$oldgameid)
{
global $RULES;
echo "
\n\n
";
return;
}
function output_form_for_new_game($names)
{
$copy_names = $names; /* local copy, so that we can delete names from it
* after we selected them to make sure that each name
* only shows up once
*/
?>
\n";
$i=0;
if($caption!="")
$HTML .= "
$caption
\n";
foreach($data as $record)
{
if(!$i)
$HTML .= " \n
\n";
else
{
if($i==1) $HTML .= "
\n";
$HTML .= "
";
}
foreach($record as $point)
{
if($i)
$HTML .= "
$point
";
else
$HTML .= "
$point
";
}
if(!$i)
$HTML .= "
\n \n";
else
{
$HTML .= " \n";
}
$i++;
}
$HTML .= " \n\n";
return $HTML;
}
function display_card($card,$dir="english")
{
/* cards are only availabl for the odd values, e.g. 1.png, 3.png, ...
* convert even cards to the matching odd value */
if( $card/2 - (int)($card/2) == 0.5 || $card == 0)
echo "\n";
else
echo "\n";
return;
}
function display_link_card($card,$dir="english",$type="card")
{
if( $card/2 - (int)($card/2) == 0.5)
echo "\n";
else
echo "\n";
return;
}
function output_check_for_sickness($me,$mycards)
{
global $RULES;
?>
Thanks for joining the game...
Do you want to play solo?
";
echo " no \n";
}
else
{
echo " no \n";
};
echo "Do you have poverty?";
if(count_trump($mycards)<4)
{
echo " yes";
echo " no \n";
}
else
{
echo " no \n";
};
echo "Do you have too many nines?";
if(count_nines($mycards)>4)
{
echo " yes";
echo " no \n";
}
else
{
echo " no \n";
};
if($RULES['lowtrump']=='cancel' || $RULES['lowtrump']=='poverty')
{
if($RULES['lowtrump']=='cancel')
echo "Do you have low trump (cancel game)?";
else
echo "Do you have low trump (poverty)?";
if(check_low_trump($mycards))
{
echo " yes";
echo " no \n";
}
else
{
echo " no \n";
};
}
else
echo "";
echo "\n";
echo "\n";
echo "