All Packages  Class Hierarchy
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
  Index of all Fields and Methods
  -  	append(Item).
Method in class busrider.ItemCollection
  
 -  adds the Item to the collection.
 
  -  	BANK_OWNER.
Static variable in class busrider.Game
  
 -  the player-index of the bank, -1.
  
 -  	beginTurn().
Method in interface busrider.Strategy
  
 -  called at the start of the player's turn.
  
 -  	beginTurn().
Method in class busrider.StrategyAdapter
  
 -  does nothing.
  
 -  	beginTurn().
Method in class busrider.StrategyWrapper
  
 -  
  
 -  	Board().
Constructor for class busrider.Board
  
 -  constructs an empty board.
  
 -  	BoardBuilder().
Constructor for class busrider.BoardBuilder
  
 -  
 
  -  	chooseDestination(Junction, Junction).
Method in interface busrider.Strategy
  
 -  called to let the Strategy choose one of two Destinations.
  
 -  	chooseDestination(Junction, Junction).
Method in class busrider.StrategyAdapter
  
 -  returns null, to let the conductor choose the destination.
  
 -  	chooseDestination(Junction, Junction).
Method in class busrider.StrategyWrapper
  
 -  
  
 -  	chooseSegment(int).
Method in interface busrider.Strategy
  
 -  called whenever it is the player's turn to move, and the Strategy
may choose a Segment to follow.
  
 -  	chooseSegment(int).
Method in class busrider.StrategyAdapter
  
 -  returns null, to let the conductor choose the path.
  
 -  	chooseSegment(int).
Method in class busrider.StrategyWrapper
  
 -  
  
 -  	convert().
Method in class busrider.BoardBuilder
  
 -  
 
  -  	endGame(int).
Method in interface busrider.Strategy
  
 -  indicates that the game has ended.
  
 -  	endGame(int).
Method in class busrider.StrategyAdapter
  
 -  does nothing.
  
 -  	endGame(int).
Method in class busrider.StrategyWrapper
  
 -  
  
 -  	endTurn().
Method in interface busrider.Strategy
  
 -  called at the end of the player's turn.
  
 -  	endTurn().
Method in class busrider.StrategyAdapter
  
 -  does nothing.
  
 -  	endTurn().
Method in class busrider.StrategyWrapper
  
 -  
  
 -  	equals(Object).
Method in class busrider.Indexed
  
 -  compares for index-equality.
  
 -  	equals(Object).
Method in class busrider.Item
  
 -  compares for content equality.
  
 -  	equals(Object).
Method in class busrider.Junction
  
 -  compares for name-equality.
  
 -  	equals(Object).
Method in class busrider.Player
  
 -  compares two objects.
  
 -  	equals(Object).
Method in class busrider.Route
  
 -  compares two objects.
  
 -  	equals(Object).
Method in class busrider.Segment
  
 -  compares for content-equality.
 
  -  	FailureException().
Constructor for class busrider.FailureException
  
 -  default constructor
  
 -  	FailureException(String).
Constructor for class busrider.FailureException
  
 -  constructor with String parm
  
 -  	findName(String).
Method in class busrider.ItemCollection
  
 -  returns the Item with the given name, or null if there isn't one.
 
  -  	Game(String[], Object).
Constructor for class busrider.Game
  
 -  constructs a Game object.
  
 -  	gameIsOver().
Method in class busrider.Game
  
 -  indicates whether the game is over.
  
 -  	getAjunc().
Method in class busrider.Segment
  
 -  returns the segment's "A" junction.
  
 -  	getBjunc().
Method in class busrider.Segment
  
 -  returns the segment's "B" junction.
  
 -  	getBoard().
Method in class busrider.Game
  
 -  returns the board.
  
 -  	getCash().
Method in class busrider.Player
  
 -  returns the player's cash.
  
 -  	getCash().
Method in class busrider.PlayerView
  
 -  returns the player's cash, if this PlayerView was delivered to
Strategy.startGame(); otherwise returns 0.
   -  	getCurrentRoute().
Method in class busrider.Player
  
 -  returns the player's current Route, or null if none.
  
 -  	getCurrentRoute().
Method in class busrider.PlayerView
  
 -  returns the player's current Route.
  
 -  	getDestination().
Method in class busrider.Player
  
 -  returns the player's destination.
  
 -  	getDestination().
Method in class busrider.PlayerView
  
 -  returns the player's destination.
  
 -  	getDistanceTraversed().
Method in class busrider.Location
  
 -  returns the distance already traversed along the Segment, or -1 if
at a junction.
  
 -  	getIndex().
Method in class busrider.Indexed
  
 -  returns the index.
  
 -  	getIndex().
Method in class busrider.PlayerView
  
 -  returns the player's index.
  
 -  	getInstance().
Static method in class busrider.Game
  
 -  returns the instance of the Game.
  
 -  	getItem(int).
Method in class busrider.ItemCollection
  
 -  returns the 
idx'th element of the collection.
   -  	getJunction().
Method in class busrider.Location
  
 -  returns the location's junction, or null if within a segment.
  
 -  	getJunction(int).
Method in class busrider.Board
  
 -  returns the 
idx'th junction.
   -  	getJunctionQuan().
Method in class busrider.Board
  
 -  returns the number of junctions.
  
 -  	getKind().
Method in class busrider.Purchase
  
 -  returns the kind.
  
 -  	getLength().
Method in class busrider.Segment
  
 -  returns the segment's length.
  
 -  	getLocation().
Method in class busrider.Player
  
 -  returns the location of the player.
  
 -  	getLocation().
Method in class busrider.PlayerView
  
 -  returns a copy of the player's location.
  
 -  	getName().
Method in class busrider.Item
  
 -  returns the name.
  
 -  	getName().
Method in class busrider.PlayerView
  
 -  returns the player's name.
  
 -  	getNextJunction().
Method in class busrider.Location
  
 -  returns the "moving to" junction of the location, or null if at
a junction.
  
 -  	getOrigin().
Method in class busrider.Player
  
 -  returns the player's origin.
  
 -  	getOrigin().
Method in class busrider.PlayerView
  
 -  returns the player's terminus of origin.
  
 -  	getOther(Junction).
Method in class busrider.Segment
  
 -  given one of the two endpoint junctions, returns the other.
  
 -  	getOwner(Route).
Method in class busrider.Game
  
 -  returns the index of the player who owns the given route,
or BANK_OWNER if the bank owns it.
  
 -  	getPayoff(Junction, Junction).
Method in class busrider.Board
  
 -  returns the payoff for a trip from one terminus to another.
  
 -  	getPlayers(Object).
Method in class busrider.Game
  
 -  a way for the GameApplet to view the players.
  
 -  	getPlayerView(int).
Method in class busrider.Game
  
 -  returns a view of a player.
  
 -  	getPopularity().
Method in class busrider.Junction
  
 -  returns the junction's popularity.
  
 -  	getPrevJunction().
Method in class busrider.Location
  
 -  returns the "moving from" junction of the location, or null if at
a junction.
  
 -  	getPrice().
Method in class busrider.Route
  
 -  returns the price.
  
 -  	getPX().
Method in class busrider.Junction
  
 -  returns the junction's X-coordinate.
  
 -  	getPY().
Method in class busrider.Junction
  
 -  returns the junction's Y-coordinate.
  
 -  	getQuan().
Method in class busrider.ItemCollection
  
 -  returns the number of objects in the collection.
  
 -  	getRoute().
Method in class busrider.Purchase
  
 -  returns the route, or null if none.
  
 -  	getRoute().
Method in class busrider.Segment
  
 -  returns the segment's route.
  
 -  	getRoute(int).
Method in class busrider.Board
  
 -  returns the 
idx'th route.
   -  	getRouteQuan().
Method in class busrider.Board
  
 -  returns the number of routes.
  
 -  	getSegment().
Method in class busrider.Location
  
 -  returns the location's segment, or null if at a junction.
  
 -  	getSegment(int).
Method in class busrider.Board
  
 -  returns the 
idx'th segment.
   -  	getSegment(int).
Method in class busrider.Junction
  
 -  returns the 
idx'th segment connecting to the junction.
   -  	getSegment(int).
Method in class busrider.Route
  
 -  returns the 
idx'th segment.
   -  	getSegmentQuan().
Method in class busrider.Board
  
 -  returns the number of segments.
  
 -  	getSegmentQuan().
Method in class busrider.Junction
  
 -  returns the number of segments connecting to the junction.
  
 -  	getSegmentQuan().
Method in class busrider.Route
  
 -  returns the number of segments.
  
 -  	getStrategy().
Method in class busrider.Player
  
 -  returns the player's Strategy.
  
 -  	getTotalPopularity().
Method in class busrider.Board
  
 -  returns the total popularity of all termini.
  
 -  	getWinnerIndex().
Method in class busrider.Game
  
 -  indicates who won, if anyone.
 
  -  	incrementCash(int).
Method in class busrider.Player
  
 -  adds a value to the player's cash.
  
 -  	Indexed(int).
Constructor for class busrider.Indexed
  
 -  constructs an object.
  
 -  	INITIAL_CASH.
Static variable in class busrider.Game
  
 -  The initial cash of a player, $40.
  
 -  	initialize(Junction).
Method in class busrider.Player
  
 -  initializes a player, to the given terminus;
cash=
INITIAL_CASH; speed=slow; currentRoute=none.
   -  	isBankrupt().
Method in class busrider.PlayerView
  
 -  indicates whether the player is bankrupt.
  
 -  	isFast().
Method in class busrider.Player
  
 -  indicates whether the player is fast (has a Right-of-Way.)
  
 -  	isFast().
Method in class busrider.PlayerView
  
 -  indicates whether the player is fast (throws three dice).
  
 -  	isTerminus().
Method in class busrider.Junction
  
 -  indicates whether the junction is a terminus.
  
 -  	isWealthy().
Method in class busrider.PlayerView
  
 -  indicates whether the player has at least
Game.WEALTHY_CASH cash.
   -  	Item(String, int).
Constructor for class busrider.Item
  
 -  constructs an object.
  
 -  	ItemCollection().
Constructor for class busrider.ItemCollection
  
 -  constructs an empty collection.
 
  -  	Junction(MutableJunction, BoardBuilder).
Constructor for class busrider.Junction
  
 -  constructs an object like the given MutableJunction.
  
 -  	junctions.
Variable in class busrider.BoardBuilder
  
 -  The Junctions, after the board is built.
 
  -  	LARGE_FARE.
Static variable in class busrider.Game
  
 -  the fare of a opponent-owned route, $20.
  
 -  	loadBoard(String).
Static method in class busrider.Board
  
 -  produces a board from a file.
  
 -  	Location(Junction).
Constructor for class busrider.Location
  
 -  constructs a location at the given junction.
  
 -  	Location(Location).
Constructor for class busrider.Location
  
 -  copies a Location.
 
  -  	main(String[]).
Static method in class busrider.Game
  
 -  runs the game.
  
 -  	move(int, Route[]).
Method in class busrider.Player
  
 -  moves the player toward his destination, according to the
segments chosen by the strategy.
  
 -  	MutableJunction(String, int, int, int, int).
Constructor for class busrider.MutableJunction
  
 -  constructs an object with the given name, index, popularity,
coordinates, and no segments.
  
 -  	MutableRoute(String, int, int).
Constructor for class busrider.MutableRoute
  
 -  constructs an object with the given name, and price, and no
segments.
  
 -  	MutableSegment(MutableJunction, MutableJunction, int, MutableRoute).
Constructor for class busrider.MutableSegment
  
 -  constructs an object with the given junctions, length, and route.
  
 -  	mutjuncs.
Variable in class busrider.BoardBuilder
  
 -  The MutableJunctions, before the board is built.
  
 -  	mutroutes.
Variable in class busrider.BoardBuilder
  
 -  The MutableRoutes, before the board is built.
  
 -  	mutsegs.
Variable in class busrider.BoardBuilder
  
 -  The MutableSegments, before the board is built.
 
  -  	noteArrival(Board).
Method in class busrider.Player
  
 -  notes the players arrival at a destination.
 
  -  	parse(StringTokenizer, boolean, int).
Static method in class busrider.MutableJunction
  
 -  parses a MutableJunction from a 
StringTokenizer.
   -  	parse(StringTokenizer, int).
Static method in class busrider.MutableRoute
  
 -  parses a MutableRoute from a 
StringTokenizer.
   -  	parse(StringTokenizer, ItemCollection).
Static method in class busrider.MutableSegment
  
 -  parses a routeless segment from a 
StringTokenizer.
   -  	pickSegment(int, Junction, Junction, Route).
Static method in class busrider.Router
  
 -  picks the next segment to traverse.
  
 -  	Player(String, int, Strategy, Junction).
Constructor for class busrider.Player
  
 -  creates a player, with the given name, index, strategy, and initial
terminus; cash=
INITIAL_CASH; speed=slow;
currentRoute=none.
   -  	playerIsFast(int).
Method in interface busrider.Strategy
  
 -  called whenever a player buys a Right-of-way.
  
 -  	playerIsFast(int).
Method in class busrider.StrategyAdapter
  
 -  does nothing.
  
 -  	playerIsFast(int).
Method in class busrider.StrategyWrapper
  
 -  
  
 -  	PlayerView(Player, boolean).
Constructor for class busrider.PlayerView
  
 -  creates a PlayerView.
  
 -  	playStep(Object).
Method in class busrider.Game
  
 -  a way for the GameApplet to advance the game one step.
  
 -  	Purchase(int, Route).
Constructor for class busrider.Purchase
  
 -  constructs an object of the given kind and route.
 
  -  	receiveFare(int, int).
Method in interface busrider.Strategy
  
 -  called whenever someone pays this player for riding on his routes.
  
 -  	receiveFare(int, int).
Method in class busrider.StrategyAdapter
  
 -  does nothing.
  
 -  	receiveFare(int, int).
Method in class busrider.StrategyWrapper
  
 -  
  
 -  	resetGame(Object, int).
Method in class busrider.Game
  
 -  a way for the GameApplet to reset the game.
  
 -  	RIGHT_OF_WAY.
Static variable in class busrider.Purchase
  
 -  kind codes: 
ROUTE, RIGHT_OF_WAY.
   -  	RIGHT_OF_WAY_COST.
Static variable in class busrider.Game
  
 -  the cost of a Right-of-way, $60.
  
 -  	ROUTE.
Static variable in class busrider.Purchase
  
 -  kind codes: 
ROUTE, RIGHT_OF_WAY.
   -  	Route(MutableRoute, BoardBuilder).
Constructor for class busrider.Route
  
 -  constructs an object like the given MutableRoute, with the given
index.
  
 -  	Router().
Constructor for class busrider.Router
  
 -  
  
 -  	routes.
Variable in class busrider.BoardBuilder
  
 -  The Routes, after the board is built.
 
  -  	Segment(MutableSegment, BoardBuilder).
Constructor for class busrider.Segment
  
 -  constructs an object like the MutableSegment parameter.
  
 -  	segments.
Variable in class busrider.BoardBuilder
  
 -  The Segments, after the board is built.
  
 -  	setDestination(Junction).
Method in class busrider.Player
  
 -  sets the player's destination to 
dest.
   -  	setSegment(Segment).
Method in class busrider.Location
  
 -  sets the location's segment.
  
 -  	setSpeed(boolean).
Method in class busrider.Player
  
 -  sets the player's speed.
  
 -  	SMALL_FARE.
Static variable in class busrider.Game
  
 -  the fare of a bank-owned route, $2.
  
 -  	startGame(Game, PlayerView).
Method in interface busrider.Strategy
  
 -  indicates that a game is starting.
  
 -  	startGame(Game, PlayerView).
Method in class busrider.StrategyAdapter
  
 -  does nothing.
  
 -  	startGame(Game, PlayerView).
Method in class busrider.StrategyWrapper
  
 -  
  
 -  	StrategyAdapter().
Constructor for class busrider.StrategyAdapter
  
 -  
  
 -  	StrategyWrapper(Strategy).
Constructor for class busrider.StrategyWrapper
  
 -  
 
  -  	toString().
Method in class busrider.Location
  
 -  returns a string representation.
  
 -  	toString().
Method in class busrider.Player
  
 -  returns a string representation of the player.
  
 -  	toString().
Method in class busrider.Segment
  
 -  returns a string representation.
  
 -  	transferRoute(int).
Method in interface busrider.Strategy
  
 -  called whenever a route changes ownership, after the change.
  
 -  	transferRoute(int).
Method in class busrider.StrategyAdapter
  
 -  does nothing.
  
 -  	transferRoute(int).
Method in class busrider.StrategyWrapper
  
 -  
  
 -  	travel(int).
Method in class busrider.Location
  
 -  moves the location along a segment.
 
  -  	WEALTHY_CASH.
Static variable in class busrider.Game
  
 -  the amount of cash needed to be wealthy, 3/4 of WINNING_CASH.
  
 -  	WINNING_CASH.
Static variable in class busrider.Game
  
 -  the amount of cash needed to win, $500.
 
  -  	youAreBroke().
Method in interface busrider.Strategy
  
 -  called near the end of a player's turn, when his cash is
negative, and the player has nothing to sell.
  
 -  	youAreBroke().
Method in class busrider.StrategyAdapter
  
 -  does nothing.
  
 -  	youAreBroke().
Method in class busrider.StrategyWrapper
  
 -  
  
 -  	youArrived().
Method in interface busrider.Strategy
  
 -  called to inform the player of his arrival at his destination.
  
 -  	youArrived().
Method in class busrider.StrategyAdapter
  
 -  returns null, to purchase nothing.
  
 -  	youArrived().
Method in class busrider.StrategyWrapper
  
 -  
  
 -  	youMustSell().
Method in interface busrider.Strategy
  
 -  called near the end of a player's turn, when his cash is
negative.
  
 -  	youMustSell().
Method in class busrider.StrategyAdapter
  
 -  returns null, to let the conductor choose the sale.
  
 -  	youMustSell().
Method in class busrider.StrategyWrapper
  
 -