All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class busrider.StrategyWrapper

java.lang.Object
   |
   +----busrider.StrategyWrapper

public class StrategyWrapper
extends Object
implements Strategy
This class wraps a Strategy, intercepting Exceptions.

It may be possible for a player to forge Junction, Segment, and Route objects, and return them. This class "legalizes" such an object by mapping it to an object found in the real Board, or to null.


Constructor Index

StrategyWrapper(Strategy)

Method Index

beginTurn()
chooseDestination(Junction, Junction)
chooseSegment(int)
endGame(int)
endTurn()
playerIsFast(int)
receiveFare(int, int)
startGame(Game, PlayerView)
transferRoute(int)
youAreBroke()
youArrived()
youMustSell()

Constructors

StrategyWrapper
 public StrategyWrapper(Strategy stra)

Methods

startGame
 public void startGame(Game ga,
                       PlayerView me)
endGame
 public void endGame(int winner)
playerIsFast
 public void playerIsFast(int playerIndex)
transferRoute
 public void transferRoute(int routeIndex)
beginTurn
 public void beginTurn()
endTurn
 public void endTurn()
chooseDestination
 public Junction chooseDestination(Junction term1,
                                   Junction term2)
youArrived
 public Purchase youArrived()
chooseSegment
 public Segment chooseSegment(int roll)
youMustSell
 public Route youMustSell()
youAreBroke
 public void youAreBroke()
receiveFare
 public void receiveFare(int fromwhom,
                         int payment)

All Packages  Class Hierarchy  This Package  Previous  Next  Index