Annotation of 43BSD/games/mille/roll.c, revision 1.1.1.1

1.1       root        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: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.