player
Class EchoPlayer

java.lang.Object
  extended by player.Player
      extended by player.EchoPlayer

public class EchoPlayer
extends Player

Echo Players will always return the same a bid or ask with the same price as the value given upon instantiation and for 1 unit

Author:
tratch

Constructor Summary
EchoPlayer(java.lang.String name, double pValue)
           
 
Method Summary
 double getValue(Commodity comm)
          Given a commodity, the value (cost) of this commodity for this player is returned
 Ask makeAsk(Ask theAsk, Market theMarket)
           
 Bid makeBid(Bid theBid, Market theMarket)
           
 void setValue(double value)
           
 
Methods inherited from class player.Player
addToInventory, browseInventory, clearFromInventory, clearInventory, clearValueFunction, getInventory, getPlayerName, printInventory, removeFromInventory, setBudget, setPlayerName, setValue
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EchoPlayer

public EchoPlayer(java.lang.String name,
                  double pValue)
Parameters:
name -
pValue -
Method Detail

makeAsk

public Ask makeAsk(Ask theAsk,
                   Market theMarket)
Specified by:
makeAsk in class Player
Returns:
An Ask under the given market conditions

makeBid

public Bid makeBid(Bid theBid,
                   Market theMarket)
Specified by:
makeBid in class Player
Returns:
A bid under the given market conditions

getValue

public double getValue(Commodity comm)
Description copied from class: Player
Given a commodity, the value (cost) of this commodity for this player is returned

Overrides:
getValue in class Player
Returns:
The value for the given commodity

setValue

public void setValue(double value)
Parameters:
value -