Oh GACK! src-clean doesn't quite work that easily since cleandist rebuilds the
[unix-history] / games / hack / rnd.c
CommitLineData
15637ed4
RG
1/* rnd.c - version 1.0.2 */
2
3#define RND(x) ((random()>>3) % x)
4
5rn1(x,y)
6register x,y;
7{
8 return(RND(x)+y);
9}
10
11rn2(x)
12register x;
13{
14 return(RND(x));
15}
16
17rnd(x)
18register x;
19{
20 return(RND(x)+1);
21}
22
23d(n,x)
24register n,x;
25{
26 register tmp = n;
27
28 while(n--) tmp += RND(x);
29 return(tmp);
30}