public class DoublingDie extends Die
A doubling die works much like a regular die except that the value of each face increases exponentially by a power of 2, rather than linearly.
Normally, only 6-faced, cube-shaped doublers are seen in the wild. This class, however, allows you to create one with any number of faces.
|Constructor and Description|
Creates a DoublingDie instance with the default number of sides (6).
Creates a new DoublingDie object with
|Modifier and Type||Method and Description|
Simulates rolling a number of doubling dice with a number of sides represented by this instance.
public DoublingDie(int s)
snumber of sides.
s- the number of sides represented by this DoublingDie object.