예제 #1
0
/images/zoom.png" alt="" style="vertical-align: middle;"> <span class="text blue pointer" onclick="toggleCardViewer('show');">Show cardviewer</span></div>
			
			<div id="cardviewer" class="mini"><div onclick="toggleCardViewer('hide');" id="closecard"><img src="<?php 
echo $path;
?>
/images/close.png"></div><div id="cardcloseup"><img src="<?php 
echo $firstcard_src;
?>
"></div></div>
		<br />
		<br />
		<br />

		<div id="sideboard">
			<?php 
echo printDeck($draft_id, "sideboard", $_SESSION["sort_order"]);
?>
		</div>
			
		<script type="text/javascript">
		if(readCookie("cardposition_top")) {
			document.getElementById('cardviewer').style.top = readCookie("cardposition_top");
		}
		if(readCookie("cardposition_left")) {
			document.getElementById('cardviewer').style.left = readCookie("cardposition_left");
		}
		new Draggable('cardviewer',{onEnd: function (dragObj, event) {
			createCookie("cardposition_top",document.getElementById('cardviewer').style.top,"7");
			createCookie("cardposition_left",document.getElementById('cardviewer').style.left,"7"); }
		});
		if(readCookie("hidecard")) {
예제 #2
0
shuffleDeck($deck);
echo 'Deck after shuffling, but before dealing: <br/>';
echo "<pre>";
print_r($deck);
echo "</pre>";
printDeck($deck, "Deck After Shuffling, But Before Dealing");
echo '<br />';
echo '<br />';
$players = array('Joe', 'Mary', 'Zim');
$numCards = 3;
$playerHands = deal($players, $numCards, $deck);
//echo 'Hands each player has: <br/>';
//echo print_r($playerHands);
printHands($playerHands);
echo '<br />';
echo '<br />';
echo 'Deck after dealing: <br/>';
echo print_r($deck);
printDeck($deck, "Deck After Dealing");
/*
$newDeck = getDeck();

shuffleDeck($newDeck);

deal(5, 5, $newDeck);
*/
?>
</body>
</html>