A B C D E F G H I L M N O P Q R S T V W X

A

add(int, int) - Method in class Inventory
Adds specified amount of item to Inventory This applies only to tradeable items: food, ammunition, and propulsion Items may correspond to Inventory.FOOD_POS,Inventory.AMMO_POS, or Inventory.OXEN_POS
addLeader(String) - Method in class Party
Adds a leader (Person) to the party.
addLeader(String) - Method in class Vehicle
Adds a leader to the Party by calling Party.addLeader(java.lang.String)
addPartyMember(String) - Method in class Party
Adds a new party member (Person) to the party
addPartyMember(String) - Method in class Vehicle
Adds a party member to the Party by calling Party.addPartyMember(java.lang.String)
addToMoney(double) - Method in class Vehicle
Increases the vehcile's (player's) money by the amount passed
advanceTurn(double, int, boolean) - Static method in class Control
This method updates game state.
AMMO_POS - Static variable in class Inventory
The value corresponding to ammunition in the inventory
ammunition - Variable in class Inventory
The amount of ammunition in the Inventory
appearance - Variable in class Location
The name of the location.
AVAILABLE - Static variable in class Parser
The value that Parser.parse() returns if the user enters 'available' to check on the supplies available.

B

BOARD_HEIGHT - Static variable in class Game
The height of the board/map, in rows.
BOARD_WIDTH - Static variable in class Game
The width of the board/map, in columns.
BUY - Static variable in class Parser
The value that Parser.parse() returns if the user enters 'buy' to buy cargo at the current depot.
buyItem(Vehicle) - Method in class Depot
Finds the item the vehicle(player) wants to buy in the depot's inventory, by calling Parser.getItemToTrade(Inventory, double), then checks if the player has enough money to buy the item, if so removes it from the market's inventory, adds it to the vehicle's inventory and subtracts the cost from the vehicle's (player's) money.

C

changeHealth(int) - Method in class Person
Changes the health of the person by the amount specified.
cheatModeEnabled - Static variable in class Game
Holds whether or not cheat mode has been enabled
CHECK - Static variable in class Parser
The value that Parser.parse() returns if the user enters 'CHECK' to check on the party's status.
chooseTerrainType() - Method in class Location
Chooses a random terrain type based on a random number, of type double, generated from Game.random.
Control - Class in <Unnamed>
This class represents the Control within our game.
Control() - Constructor for class Control
 
currentPartySize - Variable in class Party
The size of the Party

D

DEFAULT_AMMO_AMOUNT - Static variable in class Game
The default amount of ammo that each depot will have
DEFAULT_AMMO_COST - Static variable in class Game
The amount that ammo costs (not counting the price factors of depots)
DEFAULT_FOOD_AMOUNT - Static variable in class Game
The default amount of food that each depot will have
DEFAULT_FOOD_COST - Static variable in class Game
The amount that food costs (not counting the price factors of depots)
DEFAULT_OXEN_AMOUNT - Static variable in class Game
The default amount of oxen that each depot will have
DEFAULT_OXEN_COST - Static variable in class Game
The amount that oxen costs (not counting the price factors of depots)
DEFAULT_PARTY_SIZE - Static variable in class Game
The party size, counting the leader.
DEFAULT_VISIBILITY - Static variable in class Game
The number of squares, in each direction, that the player can see the terrain type (and depot status) of.
DENSITY_FOREST - Static variable in class Game
The density of forest squares -- the percent (out of 1) of overall squares that will be forests.
DENSITY_MOUNTAIN - Static variable in class Game
The density of mountain squares -- the percent (out of 1) of overall squares that will be mountains.
Depot - Class in <Unnamed>
 
Depot(Location) - Constructor for class Depot
Specific one-parameter constructor.
Depot(double, Location, String) - Constructor for class Depot
Specific three-parameter constructor
depot - Variable in class Location
The Depot belonging to the location.
DEPOT - Static variable in class Parser
The value that Parser.parse() returns if the user enters 'depot' to enter the depot at the current location.
DEPOT_CHANCE - Static variable in class Game
The chance (out of 1) that a depot will occur on a given location
depotDensity - Variable in class Map
The density of the number of Depots on the map
depotNames - Static variable in class Descriptions
Depot names
Descriptions - Class in <Unnamed>
 
Descriptions() - Constructor for class Descriptions
 
DISTANCE_BETWEEN_SQUARES - Static variable in class Game
The number of units between successive squares.
DISTANCE_UNIT - Static variable in class Game
The particular unit (miles, kilometers, parsecs, etc.) that the DISTANCE_BETWEEN_SQUARES is stated in.
DO_NOT_UNDERSTAND - Static variable in class Parser
The value that Parser.parse() returns if it did not understand what the user entered.

E

enterDepot(Vehicle) - Method in class Depot
Handles transactions that are possible in the Depot.
EXIT_DEPOT - Static variable in class Parser
The value that Parser.parse() returns if the user enters 'exit' to exit the depot and return to the location.

F

FINISH_COL_COORD - Static variable in class Game
The ending row coordinate for the game.
FINISH_ROW_COORD - Static variable in class Game
The ending column coordinate for the game.
food - Variable in class Inventory
The amount of food available in the Inventory
FOOD - Static variable in class Parser
The value that Parser.parse() returns if the user enters 'food' to change food rations.
FOOD_CONSUMPTION_RATE - Static variable in class Game
How many pounds of food each person consumes per day.
FOOD_POS - Static variable in class Inventory
The value corresponding to food in the inventory
forestDensity - Variable in class Map
The density of the number of forests on the map.

G

Game - Class in <Unnamed>
class Game is the main class
Game() - Constructor for class Game
 
generateRandomDepotName() - Static method in class Descriptions
Returns a random Depot name
generateRandomHealthEvent() - Static method in class Descriptions
Returns a random health event description
generateRandomTerrainAdjective() - Static method in class Descriptions
Returns a random terrain adjective
getAmmunition() - Method in class Inventory
 
getAmount(int) - Method in class Inventory
Returns the amount of the specified item.
getAppearance() - Method in class Location
 
getCorrespondingHealthChange(String) - Static method in class Descriptions
Returns the health penalty for the passed health event
getCost(int, double) - Method in class Inventory
Returns the cost of the item at the current Depot's price factor.
getCurrentPartySize() - Method in class Party
Returns the value of currentPartySize
getDepot() - Method in class Location
 
getDepotDensity() - Method in class Map
Returns the value of the private data member depotDensity
getEvent - Static variable in class Descriptions
Random health events
getFood() - Method in class Inventory
 
getForestDensity() - Method in class Map
Returns the value of the private data member forestDensity
getHealth() - Method in class Person
 
getInteger() - Static method in class Parser
This method just reads in an integer, and returns that value.
getInventory() - Method in class Depot
 
getInventory() - Method in class Vehicle
 
getIsAlive() - Method in class Person
 
getIsVisited() - Method in class Location
 
getItemToTrade(Inventory, double) - Static method in class Parser
This method asks the user to enter the number corresponding to the items he/she wants to trade
getLeader() - Method in class Vehicle
 
getLeaderName() - Static method in class Descriptions
Returns the name of the Party leader
getLocation() - Method in class Depot
 
getLocation() - Method in class Vehicle
 
getLocationAt(int, int) - Method in class Map
Returns the location at the coordinates specified by row and col.
getMap() - Method in class Map
Returns the 2-D private data member map
getMapTitle() - Static method in class Descriptions
Returns the title of the map
getMoney() - Method in class Inventory
 
getMoney() - Method in class Vehicle
 
getMountainDensity() - Method in class Map
Returns the value of the private data member mountainDensity.
getMoveDirection() - Static method in class Parser
This method obtains a direction (n/s/e/w) to move, and returns the appropriate constant.
getName() - Method in class Depot
 
getName() - Method in class Person
 
getNumberAlive() - Method in class Party
Returns the number of people in the Party who are still alive
getNumCols() - Method in class Map
Returns the number of columns on the map.
getNumItems() - Static method in class Inventory
 
getNumRows() - Method in class Map
Returns the number of rows on the Map.
getOxen() - Method in class Inventory
 
getParty() - Method in class Vehicle
 
getPartyMemberName() - Static method in class Descriptions
Returns the name of the next party member
getPerson(int) - Method in class Party
Returns a Person given their position in the Party
getPosCol() - Method in class Location
 
getPosRow() - Method in class Location
 
getPriceFactor() - Method in class Depot
 
getPropulsionName() - Static method in class Descriptions
Returns the name of the propulsion type (oxen, rockets, etc.)
getTerrainCharacter(int) - Static method in class MapPrinter
Gets the single character that represents a terrain type.
getTerrainMovementCost() - Method in class Location
Returns the cost of moving across the Location's terrain type.
getTerrainType() - Method in class Location
 
getTerrainTypeName(int) - Static method in class Descriptions
Returns the name of the terrain type (grassland, mountain, forest, or similar)
getTotalDistanceTraveled() - Method in class Vehicle
 
getTotalTimeTaken() - Method in class Vehicle
 
getVehicleName() - Static method in class Descriptions
Returns the name for a vehicle
getVehicleType() - Method in class Vehicle
 

H

health - Variable in class Person
The person's health
HEALTH_PROBLEM_CHANCE - Static variable in class Game
The chance (out of 1) that a health 'problem' will occur on a given turn.
healthChanges - Static variable in class Descriptions
Health costs for various random health events (must be the same size as getEvent)
HUNT - Static variable in class Parser
The value that Parser.parse() returns if the user enters 'hunt' to hunt/forage for food.

I

increaseCapacity() - Method in class Party
Increases the capacity of theParty array
Inventory - Class in <Unnamed>
 
Inventory() - Constructor for class Inventory
Default constructor
Inventory(int, double, int, int) - Constructor for class Inventory
Specific four-parameter constructor.
INVENTORY - Static variable in class Parser
The value that Parser.parse() returns if the user enters 'inventory' to display his/her inventory.
isAlive - Variable in class Person
Is the person alive? If yes, the value is true.
isAnybodyAlive() - Method in class Party
Returns if any member of the Party is alive
isVisited - Variable in class Location
Flag indicating whether the location has been visited before.

L

lastPartyMember - Static variable in class Descriptions
 
Location - Class in <Unnamed>
 
Location() - Constructor for class Location
Default constructor.
Location(int, int) - Constructor for class Location
Specific two-parameter constructor.
Location(int, int, int, String, Depot) - Constructor for class Location
Specific five-parameter constructor.

M

main(String[]) - Static method in class Game
 
map - Static variable in class Game
The main Map object that the game uses
Map - Class in <Unnamed>
This class creates a map of locations which represents the game board for Oregon Trail
Map() - Constructor for class Map
Default constructor.
Map(int, int) - Constructor for class Map
This constructor initializes a 2D map of null Location references using the values specified by height and width as row and column dimensions, if they are positive.
Map(int, int, double, double, double) - Constructor for class Map
This specific constructor initializes the 2D map using the given height and width parameters, if positive, as the row and column dimensions.
map - Variable in class Map
The 2d array of locations in the map, indexed by row-col coordinates.
MapPrinter - Class in <Unnamed>
 
MapPrinter() - Constructor for class MapPrinter
 
MAX_HEALTH - Static variable in class Game
The maximum (and starting) health of the people in the party.
money - Variable in class Inventory
The amount of money available in the Inventory.
MONEY_POS - Static variable in class Inventory
The value corresponding to money in the inventory
mountainDensity - Variable in class Map
The density of the number of mountains on the map.
MOVE - Static variable in class Parser
The value that Parser.parse() returns if the user enters 'move' to move to another location on the map.
move() - Method in class Vehicle
 
MOVE_EAST - Static variable in class Game
The value returned by Parser.getMoveDirection() when the player chooses to move east.
MOVE_NORTH - Static variable in class Game
The value returned by Parser.getMoveDirection() when the player chooses to move north.
MOVE_SOUTH - Static variable in class Game
The value returned by Parser.getMoveDirection() when the player chooses to move south.
MOVE_WEST - Static variable in class Game
The value returned by Parser.getMoveDirection() when the player chooses to move west.
MOVEMENT_COST_FOREST - Static variable in class Game
How many days it takes to move through one square of each terrain type
MOVEMENT_COST_GRASSLAND - Static variable in class Game
How many days it takes to move through one square of each terrain type
MOVEMENT_COST_MOUNTAIN - Static variable in class Game
How many days it takes to move through one square of each terrain type
myInventory - Variable in class Depot
The Inventory of the Depot.
myInventory - Variable in class Vehicle
The Vehicle's inventory.
myLocation - Variable in class Depot
The Location associated with the Depot.
myLocation - Variable in class Vehicle
The current Location of the Vehicle.

N

name - Variable in class Depot
The name of the Depot.
name - Variable in class Person
The person's name
NUM_ITEMS - Static variable in class Inventory
total number of items in inventory

O

oxen - Variable in class Inventory
The amount of propulsion (oxen, rockets, etc.
OXEN_POS - Static variable in class Inventory
The value corresponding to any form of propulsion in the inventory
OXEN_SPEED_FACTOR - Static variable in class Game
A constant to determine how fast one can travel with oxen.

P

PACE - Static variable in class Parser
The value that Parser.parse() returns if the user enters 'pace' to change the pace.
parse() - Static method in class Parser
This method reads in the user's input from the keyboard, and returns a value corresponding to what the user entered.
Parser - Class in <Unnamed>
This class is used to commands as user input from the keyboard.
Parser() - Constructor for class Parser
Making the constructor private prevents anybody from calling it (as we don't want to create objects of this class)
Party - Class in <Unnamed>
 
Party() - Constructor for class Party
Party default constructor.
partyMemberNames - Static variable in class Descriptions
Possible Party member names
Person - Class in <Unnamed>
 
Person(String) - Constructor for class Person
Specific constructor
pickRandomPerson() - Method in class Party
Returns a random person picked from the Party.
player - Static variable in class Game
The main Vehicle object that represents the player
populate() - Method in class Map
This method takes care of populating the map.
posCol - Variable in class Location
Column coordinate of the Location.
posRow - Variable in class Location
Row coordinate of the Location.
possiblyEndGame() - Static method in class Control
Currently a dummy method.
PRICE_FACTOR_MODIFIER - Static variable in class Game
A constant to modify the price factor of depots.
priceFactor - Variable in class Depot
The price factor for the Depot.
printDepotCommands() - Method in class Depot
Prints the commands available in the Depot.
printInventory(double) - Method in class Inventory
Prints the Inventory and displays the amount of money available.
printInventory(double, boolean) - Method in class Inventory
Prints the Inventory, possibly displaying the amount of money available
printLocationCommands() - Static method in class Control
This method prints the commands available for the location to the screen.
printMap() - Static method in class MapPrinter
Prints the game map.
printMap(boolean) - Static method in class MapPrinter
Prints the game map.
printPartyStatus() - Method in class Party
Prints the status of the people in the Party.

Q

QUIT - Static variable in class Parser
The value that Parser.parse() returns if the user enters 'quit' to quit the game.

R

rand - Static variable in class Game
We mixed up whether to call it rand or random, so there are two references to the same object
random - Static variable in class Game
A random number generator, it's purpose here is to ensure that there is only one Random object declared in the game
remove(int) - Method in class Inventory
Removes ALL of a particular item type from an Inventory This applies only to tradeable items: food, ammunition, and propulsion Items may correspond to Inventory.FOOD_POS,Inventory.AMMO_POS, or Inventory.OXEN_POS
remove(int, int) - Method in class Inventory
Removes specified amount of a particular item from an Inventory This applies only to tradeable items: food, ammunition, and propulsion Items may correspond to Inventory.FOOD_POS,Inventory.AMMO_POS, or Inventory.OXEN_POS
REST - Static variable in class Parser
The value that Parser.parse() returns if the user enters 'rest' to rest.
REST_HEALTH_RATE - Static variable in class Game
The amount of health points recovered for each day of rest.

S

SELL - Static variable in class Parser
The value that Parser.parse() returns if the user enters 'sell' sell items at the depot.
sellItem(Vehicle) - Method in class Depot
Finds the item the vehicle(player) wants to sell in its inventory, removes it from the vehicle's inventory, adds it to the depot's inventory and adds the cost to the vechicle's (player's) money.
setAmmunition(int) - Method in class Inventory
 
setAppearance(String) - Method in class Location
 
setDepot(Depot) - Method in class Location
 
setDepotDensity(double) - Method in class Map
Sets the depotDensity property to the value passed.
setFood(int) - Method in class Inventory
 
setForestDensity(double) - Method in class Map
Sets the forestDensity property to the value passed.
setHealth(int) - Method in class Person
 
setInventory(Inventory) - Method in class Depot
 
setInventory(Inventory) - Method in class Vehicle
 
setIsAlive(boolean) - Method in class Person
 
setIsVisited(boolean) - Method in class Location
Sets isVisited field to the value passed
setLocation(Location) - Method in class Depot
 
setLocation(Location) - Method in class Vehicle
 
setLocationAt(int, int, Location) - Method in class Map
Sets the map location at the coordinates specified by row and col (if valid) to the passed Location, loc.
setMap(Location[][]) - Method in class Map
Sets the private 2-D map array to the 2-D map that is passed as a parameter.
setMoney(double) - Method in class Inventory
 
setMoney(double) - Method in class Vehicle
 
setMountainDensity(double) - Method in class Map
Sets the mountainDensity property to the parameter value passed.
setName(String) - Method in class Depot
 
setName(String) - Method in class Person
 
setOxen(int) - Method in class Inventory
 
setParty(Party) - Method in class Vehicle
 
setPosCol(int) - Method in class Location
 
setPosRow(int) - Method in class Location
 
setPriceFactor(double) - Method in class Depot
Sets the price factor if it is valid.
setPriceFactors() - Method in class Map
Sets the price factors for each Depot that exists on the map.
setTerrainType(int) - Method in class Location
 
setTotalDistanceTraveled(double) - Method in class Vehicle
 
setTotalTimeTaken(double) - Method in class Vehicle
 
setVehicleType(String) - Method in class Vehicle
 
setVisibility(int, int, int) - Method in class Map
Sets the isVisited flag to true for all the locations within visibility distance from the location specified by row and col.
START_COL_COORD - Static variable in class Game
The starting row coordinate of the player.
START_ROW_COORD - Static variable in class Game
The starting column coordinate of the player.
STARTING_MONEY - Static variable in class Game
The amount of money that the player starts with.
STARVATION_HEALTH_COST - Static variable in class Game
The amount of health points lost when there is not enough food.
starve() - Method in class Party
Starves the entire Party.
stdin - Static variable in class Parser
The Scanner object that is used by the various Parser methods
style - Static variable in class Game
A general purpose number formatter
subtractFromMoney(double) - Method in class Vehicle
Decreases the vehicle's (player's) money by the amount passed

T

takeTurn() - Static method in class Control
This is the primary method for performing an action at a location.
TERRAIN_FOREST - Static variable in class Game
One of the five values for a terrain spot in a Location object; this indicates the location is a forest
TERRAIN_GRASSLAND - Static variable in class Game
One of the five values for a terrain spot in a Location object; this indicates the location is a grassland
TERRAIN_MOUNTAIN - Static variable in class Game
One of the five values for a terrain spot in a Location object; this indicates the location is a mountain
TERRAIN_UNSET - Static variable in class Game
One of the five values for a terrain spot in a Location object; unset means it has not yet been given a value
terrainAdjectives - Static variable in class Descriptions
Adjectives to describe the terrain
terrainType - Variable in class Location
Terrain type.
theParty - Variable in class Party
An array of Person which represents the traveling group
theParty - Variable in class Vehicle
Party includes leader and other members.
TIME_UNIT - Static variable in class Game
The time unit (days, hours, etc.) -- how long travel takes is stated in this unit.
toString() - Method in class Location
The method which prints a Location.
toString() - Method in class Party
Creates a String that can be used in print statements.
toString() - Method in class Person
Print method for Person
totalDistanceTraveled - Variable in class Vehicle
The Vehicle's odometer -- how far it has traveled
totalTimeTaken - Variable in class Vehicle
The total amount of trip time.
TRADE - Static variable in class Parser
The value that Parser.parse() returns if the user enters 'TRADE' to trade.

V

Vehicle - Class in <Unnamed>
This class represents a Vehicle (player) within our game.
Vehicle() - Constructor for class Vehicle
Default Vehicle constructor
Vehicle(int) - Constructor for class Vehicle
Specific Vehicle constructor to create a Vehicle with a particular-sized Party
vehicleType - Variable in class Vehicle
Describe the type of the vehicle.

W

WORLDMAP - Static variable in class Parser
The value that Parser.parse() returns if the user enters 'worldmap' to print the map.

X

XCHEAT - Static variable in class Parser
The value that Parser.parse() returns if the user enters 'xcheat' to enable cheat mode.

A B C D E F G H I L M N O P Q R S T V W X