Nedanstående filer finns i denna katalogen. Klicka på en fil för att visa dess innehåll.
dice6/
CDice.php CDiceSvg.php CHistogram.php FDice.php FHistogram.php common.php dice.php source.php template.php
<?php // =========================================================================================== // // FDice.php // // Description: Functions for a dice // // Author: Mikael Roos // // ------------------------------------------------------------------------------------------- // // Throw a dice, return the value. // function diceThrow() { return rand(1,6); } // ------------------------------------------------------------------------------------------- // // Throw a dice repeatedly, return the value(s). // function diceThrowRepeatedly($aNumber) { $throws = Array(); for($i=1; $i<=$aNumber; $i++) { $throws[$i] = diceThrow(); } return $throws; } ?>
. ..: © Mikael Roos, 2009