|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectnet.bluebones.boggle.Die
public class Die
Represents a Boggle die (with letters on each face).
| Field Summary | |
|---|---|
static Die[] |
dice
|
static Die[] |
dice16
The set of dice used to play the 4x4 game. |
static Die[] |
dice25
The set of dice used to play the 5x5 game. |
| Constructor Summary | |
|---|---|
Die(char[] faces)
Initialises this die with the specified faces. |
|
| Method Summary | |
|---|---|
char |
getFace(int face)
Gets the char that is on the specified face of this die. |
char |
getRandomFace()
Gets a face from this die at random (simulates rolling it). |
static Die[][] |
rollDice(Die[] dice)
"Shakes" the supplied dice into a random order. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static Die[] dice16
public static Die[] dice25
public static Die[] dice
| Constructor Detail |
|---|
public Die(char[] faces)
faces - chars that appear on this die's faces. Any number of
faces is allowed and all dice in the game need not have
the same number.| Method Detail |
|---|
public char getFace(int face)
face - The face to get the char from.
public static Die[][] rollDice(Die[] dice)
dice - Dice to shake.
public char getRandomFace()
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||