Dice(3)                                                                Dice(3)



NNAAMMEE
       Dice - Inheritable or externally callable object for rolling dice.

SSYYNNOOPPSSIISS
       Inherited by LLiivviinngg.


   PPuubblliicc MMeetthhooddss
       int rroollll (int num, int sides)

DDEETTAAIILLEEDD DDEESSCCRRIIPPTTIIOONN
       Inheritable or externally callable object for rolling dice.

       #include <dice.h> to use this file.

       Contains functions for emulating dice. This file currently contains
       only one function, 'roll' which is used to accurately model the values
       of randomly rolling several dice and adding the results together.
       Rolling dice is a more useful way to generate random numbers than the
       random() function because dice have a heavy stabilizing property. For
       example, if I want a random number between 2 and 12, I can use
       random(10)+2; however, this will give me 2 or 12 just as likely as it
       will give me 7. If I roll two six-sided dice, then the probabilities
       change as follows:

       2, 12: 1/36

       3, 11: 1/18

       4, 10: 1/12

       5, 9: 1/9

       6, 80: 5/36

       7: 1/6

       For combat and similar when you want all possible results, but results
       on the average to be similar, then dice are a good way to go.

       Definition at line 25 of file dice.c.

MMEEMMBBEERR FFUUNNCCTTIIOONN DDOOCCUUMMEENNTTAATTIIOONN
   iinntt rroollll ((iinntt nnuumm,, iinntt ssiiddeess))
       Call this function to emulate rolling of _n_u_m dice with _s_i_d_e_s spots
       each.

       RReettuurrnnss::
           The sum of the dots on the dice rolled.

       PPaarraammeetteerrss::

       _n_u_m    Number of dice to roll

       _s_i_d_e_s  Number of 'spots' on each die.

       Definition at line 32 of file dice.c.


AAUUTTHHOORR
       Generated automatically by Doxygen for Walraven from the source code.



Walraven                          8 Jan 2004                           Dice(3)
