1: # include   "mille.h"
   2: 
   3: /*
   4:  *	This routine rolls ndie nside-sided dice.
   5:  *
   6:  * @(#)roll.c	1.1 (Berkeley) 4/1/82
   7:  *
   8:  */
   9: 
  10: roll(ndie, nsides)
  11: reg int ndie, nsides; {
  12: 
  13:     reg int         tot;
  14:     extern unsigned int random();
  15: 
  16:     tot = 0;
  17:     while (ndie--)
  18:         tot += random() % nsides + 1;
  19:     return tot;
  20: }

Defined functions

roll defined in line 10; used 2 times
Last modified: 1986-01-11
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 859
Valid CSS Valid XHTML 1.0 Strict