|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object | +--cardgame.VectorRandomizer
The VectorRandomizer class provides a way to arrange the elements of a Java Vector in random order. It uses the RandomIntGenerator class to generate random numbers. VectorRandomizer is especially well suited for shuffling a Deck for use with card games.
| Field Summary | |
private boolean |
statisticalMode
The private variable statisticalMode determines whether statistical information will be sent to standard out. |
| Constructor Summary | |
VectorRandomizer()
The no-argument constructor creates an instance of VectorRandomizer. |
|
VectorRandomizer(boolean mode)
This constructor creates an instance of VectorRandomizer and allows the statistical mode to be set to true. |
|
| Method Summary | |
java.util.Vector |
randomize(java.util.Vector vectorToBeRandomized)
The public method randomize takes a Vector and reorders the elements to be in a random order. |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
private boolean statisticalMode
VectorRandomizer(boolean mode),
VectorRandomizer()| Constructor Detail |
public VectorRandomizer()
VectorRandomizer(boolean mode)public VectorRandomizer(boolean mode)
statisticalMode,
VectorRandomizer()| Method Detail |
public java.util.Vector randomize(java.util.Vector vectorToBeRandomized)
RandomIntGenerator,
PlayingCard
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||