|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectmegamek.common.MMRandom
megamek.common.MMRandom.SunRandom
megamek.common.MMRandom.Pool36Random
static class MMRandom.Pool36Random
Behaves like SunRandom for everything but d6(2) calls. Then, it takes numbers from an array of the 36 possible results of two dice, shuffled.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class megamek.common.MMRandom |
|---|
MMRandom.CryptoRandom, MMRandom.Pool36Random, MMRandom.SunRandom |
| Field Summary | |
|---|---|
(package private) int |
index
|
static int |
NUM_SHUFFLES
|
(package private) MMShuffle[] |
pool
|
| Fields inherited from class megamek.common.MMRandom.SunRandom |
|---|
random |
| Fields inherited from class megamek.common.MMRandom |
|---|
R_CRYPTO, R_DEFAULT, R_POOL36, R_SUN |
| Constructor Summary | |
|---|---|
MMRandom.Pool36Random()
|
|
| Method Summary | |
|---|---|
Roll |
d6(int nDice)
Watches for 2 as nDice and then does its special thing. |
(package private) void |
initPool()
Initializes the dice pool with the possible results of two dice. |
(package private) void |
shufflePool()
Swaps two of the numbers in the pool NUM_SHUFFLES times. |
| Methods inherited from class megamek.common.MMRandom.SunRandom |
|---|
randomInt |
| Methods inherited from class megamek.common.MMRandom |
|---|
d6, generate |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int NUM_SHUFFLES
MMShuffle[] pool
int index
| Constructor Detail |
|---|
public MMRandom.Pool36Random()
| Method Detail |
|---|
public Roll d6(int nDice)
d6 in class MMRandomnDice - - the int number of dice to roll. If this
value is less than or equal to zero, an
IllegalArgumentException will be thrown.
Roll object containing the roll results.void initPool()
void shufflePool()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||