Ejemplo n.º 1
0
									<tr>
										<td width="75">Tick:</td>
										<td>
										<?
										echo parseInteger(getCurrentTick()).'/'.parseInteger(getLastTick());?> 
										<?
										$s = getNextTickTime();
										if ($s > 0) { echo '(next tick in '.getDuration($s).')'; }
										elseif ((getCurrentTick() == 0) OR (getCurrentTick() == getLastTick())) { echo '(<font color="red">OFFLINE</font>)'; } 
										else { echo '(Processing...)'; }?>
										</td>
									</tr>
									<tr>
										<td width="75">Rank:</td>
										<td><?php 
echo getPlayerRank($playerdata['id']);
?>
</td> 
									</tr>									
								</table>
							</td>
							<td width="304" valign="top">
								<table border="0" cellpadding="0" cellspacing="0" width="301">
									<tr>
										<td width="76" align="center"><a href="main.php?mod=main&act=news"><img border="0" src="<?echo $news_image;?>" width="76" height="62"></a></td>
										<td width="76" align="center"><a href="main.php?mod=main&act=mail"><img border="0" src="<?echo $mail_image;?>" width="75" height="62"></a></td>
										<td width="76" align="center"><img border="0" src="<?echo $allie_image;?>" width="75" height="62"></td>
										<td width="76" align="center"><img border="0" src="<?echo $enemy_image;?>" width="75" height="62"></td>
									</tr>
								</table>
							</td>
    return $best_hand;
}
require_once "poker_cards.php";
echo "<h3><u>Some Random Testing</u></h3><table>";
$pcards = new Cards();
for ($i = 0; $i < 20; $i++) {
    $pcards->Deal();
    unset($ph);
    unset($ch);
    $ph[] = $pcards->pickCard();
    $ph[] = $pcards->pickCard();
    $ch[] = $pcards->pickCard();
    $ch[] = $pcards->pickCard();
    $ch[] = $pcards->pickCard();
    $ch[] = $pcards->pickCard();
    $ch[] = $pcards->pickCard();
    echo "<tr><td><p><b>Select best from following.</b><br>";
    display_hand($ph);
    display_hand($ch);
    echo "</p></td>";
    $prank = getPlayerRank($ph, $ch);
    echo "<td><p><b>Result:{$prank['rank']} </b><br>";
    display_hand($prank);
    echo "</p></td></tr>";
}
echo "</table>";
?>