|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.ObjectDescriptions
public class Descriptions
This class allows for the random generation of words for the game: location name ('Ariel', 'Hera', etc.), cargo types ('Cargo', 'Silver', etc.). It also contains the corresponding cost factor for the cargo types.
| Field Summary | |
|---|---|
private static java.lang.String[] |
appearances
The list of possible descriptions |
private static double[] |
cargoCostFactors
The cost factors for the corresponding cargo types |
private static java.lang.String[] |
cargoTypes
The types of cargo that can be traded at each market |
private static java.lang.String[] |
locationNames
The possible location names for each location |
| Constructor Summary | |
|---|---|
private |
Descriptions()
The default constructor, it creates a Descriptions object. |
| Method Summary | |
|---|---|
static java.lang.String |
getAppearance()
Returns random appearance ('sunny', 'wet', etc.) |
static double |
getCargoCostFactor(java.lang.String cargo)
Returns the cost factor for the cargo specified |
static java.lang.String |
getCargoType()
Returns random cargo type ('gold', 'silver', etc.). |
static int |
getCargoTypeCount()
Returns the number of possible cargo types |
static java.lang.String |
getLocationName()
Returns random location name ('Ariel', 'Hera', etc.). |
static int |
getLocationNameCount()
Returns the number of possible location names |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static java.lang.String[] locationNames
private static java.lang.String[] cargoTypes
private static double[] cargoCostFactors
private static java.lang.String[] appearances
| Constructor Detail |
|---|
private Descriptions()
| Method Detail |
|---|
public static java.lang.String getLocationName()
public static java.lang.String getCargoType()
public static java.lang.String getAppearance()
public static int getLocationNameCount()
public static int getCargoTypeCount()
public static double getCargoCostFactor(java.lang.String cargo)
cargo - a String representing a possible cargo type
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||