|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object Game
public class Game
class Game is the main class
Field Summary | |
---|---|
static int |
BOARD_HEIGHT
The height of the board/map, in rows. |
static int |
BOARD_WIDTH
The width of the board/map, in columns. |
static boolean |
cheatModeEnabled
Holds whether or not cheat mode has been enabled |
static int |
DEFAULT_AMMO_AMOUNT
The default amount of ammo that each depot will have |
static double |
DEFAULT_AMMO_COST
The amount that ammo costs (not counting the price factors of depots) |
static int |
DEFAULT_FOOD_AMOUNT
The default amount of food that each depot will have |
static double |
DEFAULT_FOOD_COST
The amount that food costs (not counting the price factors of depots) |
static int |
DEFAULT_OXEN_AMOUNT
The default amount of oxen that each depot will have |
static double |
DEFAULT_OXEN_COST
The amount that oxen costs (not counting the price factors of depots) |
static int |
DEFAULT_PARTY_SIZE
The party size, counting the leader. |
static int |
DEFAULT_VISIBILITY
The number of squares, in each direction, that the player can see the terrain type (and depot status) of. |
static double |
DENSITY_FOREST
The density of forest squares -- the percent (out of 1) of overall squares that will be forests. |
static double |
DENSITY_MOUNTAIN
The density of mountain squares -- the percent (out of 1) of overall squares that will be mountains. |
static double |
DEPOT_CHANCE
The chance (out of 1) that a depot will occur on a given location |
static int |
DISTANCE_BETWEEN_SQUARES
The number of units between successive squares. |
static java.lang.String |
DISTANCE_UNIT
The particular unit (miles, kilometers, parsecs, etc.) that the DISTANCE_BETWEEN_SQUARES is stated in. |
static int |
FINISH_COL_COORD
The ending row coordinate for the game. |
static int |
FINISH_ROW_COORD
The ending column coordinate for the game. |
static int |
FOOD_CONSUMPTION_RATE
How many pounds of food each person consumes per day. |
static double |
HEALTH_PROBLEM_CHANCE
The chance (out of 1) that a health 'problem' will occur on a given turn. |
static Map |
map
The main Map object that the game uses |
static int |
MAX_HEALTH
The maximum (and starting) health of the people in the party. |
static int |
MOVE_EAST
The value returned by Parser.getMoveDirection() when the player chooses to move east. |
static int |
MOVE_NORTH
The value returned by Parser.getMoveDirection() when the player chooses to move north. |
static int |
MOVE_SOUTH
The value returned by Parser.getMoveDirection() when the player chooses to move south. |
static int |
MOVE_WEST
The value returned by Parser.getMoveDirection() when the player chooses to move west. |
static double |
MOVEMENT_COST_FOREST
How many days it takes to move through one square of each terrain type |
static double |
MOVEMENT_COST_GRASSLAND
How many days it takes to move through one square of each terrain type |
static double |
MOVEMENT_COST_MOUNTAIN
How many days it takes to move through one square of each terrain type |
static double |
OXEN_SPEED_FACTOR
A constant to determine how fast one can travel with oxen. |
static Vehicle |
player
The main Vehicle object that represents the player |
static double |
PRICE_FACTOR_MODIFIER
A constant to modify the price factor of depots. |
static java.util.Random |
rand
We mixed up whether to call it rand or random, so there are two references to the same object |
static java.util.Random |
random
A random number generator, it's purpose here is to ensure that there is only one Random object declared in the game |
static int |
REST_HEALTH_RATE
The amount of health points recovered for each day of rest. |
static int |
START_COL_COORD
The starting row coordinate of the player. |
static int |
START_ROW_COORD
The starting column coordinate of the player. |
static double |
STARTING_MONEY
The amount of money that the player starts with. |
static int |
STARVATION_HEALTH_COST
The amount of health points lost when there is not enough food. |
static java.text.NumberFormat |
style
A general purpose number formatter |
static int |
TERRAIN_FOREST
One of the five values for a terrain spot in a Location object; this indicates the location is a forest |
static int |
TERRAIN_GRASSLAND
One of the five values for a terrain spot in a Location object; this indicates the location is a grassland |
static int |
TERRAIN_MOUNTAIN
One of the five values for a terrain spot in a Location object; this indicates the location is a mountain |
static int |
TERRAIN_UNSET
One of the five values for a terrain spot in a Location object; unset means it has not yet been given a value |
static java.lang.String |
TIME_UNIT
The time unit (days, hours, etc.) -- how long travel takes is stated in this unit. |
Constructor Summary | |
---|---|
Game()
|
Method Summary | |
---|---|
static void |
main(java.lang.String[] args)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int TERRAIN_UNSET
public static final int TERRAIN_MOUNTAIN
public static final int TERRAIN_FOREST
public static final int TERRAIN_GRASSLAND
public static final double MOVEMENT_COST_MOUNTAIN
public static final double MOVEMENT_COST_FOREST
public static final double MOVEMENT_COST_GRASSLAND
public static final double DEPOT_CHANCE
public static final int DEFAULT_FOOD_AMOUNT
public static final int DEFAULT_OXEN_AMOUNT
public static final int DEFAULT_AMMO_AMOUNT
public static final double DEFAULT_FOOD_COST
public static final double DEFAULT_OXEN_COST
public static final double DEFAULT_AMMO_COST
public static final double DENSITY_FOREST
public static final double DENSITY_MOUNTAIN
public static final int BOARD_WIDTH
public static final int BOARD_HEIGHT
public static final int START_COL_COORD
public static final int START_ROW_COORD
public static final int FINISH_ROW_COORD
public static final int FINISH_COL_COORD
public static final int MOVE_NORTH
public static final int MOVE_SOUTH
public static final int MOVE_EAST
public static final int MOVE_WEST
public static final double STARTING_MONEY
public static final int DEFAULT_VISIBILITY
public static final int DEFAULT_PARTY_SIZE
public static final double PRICE_FACTOR_MODIFIER
public static final int MAX_HEALTH
public static final int REST_HEALTH_RATE
public static final double HEALTH_PROBLEM_CHANCE
public static final double OXEN_SPEED_FACTOR
public static final int FOOD_CONSUMPTION_RATE
public static final int STARVATION_HEALTH_COST
public static final int DISTANCE_BETWEEN_SQUARES
public static final java.lang.String DISTANCE_UNIT
public static final java.lang.String TIME_UNIT
public static Map map
public static Vehicle player
public static final java.util.Random random
public static final java.util.Random rand
public static boolean cheatModeEnabled
public static java.text.NumberFormat style
Constructor Detail |
---|
public Game()
Method Detail |
---|
public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |