net.commerce.zocalo.experiment.role
Class Role

java.lang.Object
  extended by net.commerce.zocalo.experiment.role.Role
Direct Known Subclasses:
JudgeRole, ManipulatorRole, TraderRole

public abstract class Role
extends java.lang.Object

Roles describe how to initialize subjects playing the various roles.


Constructor Summary
Role()
           
 
Method Summary
 boolean canBuy()
           
 boolean canBuy(int round)
           
 boolean canSell()
           
 boolean canSell(int round)
           
abstract  AbstractSubject createSubject(User user, int rounds, java.lang.String playerName)
           
protected  boolean dormant(int round)
           
 boolean[] dormantPeriods()
           
 Quantity getInitialCash()
           
 Quantity getInitialCoupons()
           
 void initializeDormancy(boolean[] booleans)
           
 void initializeFromProps(java.util.Properties props)
           
 boolean needsUser()
           
 boolean requiresJudges()
           
abstract  java.lang.String roleKeyword()
           
protected  void setInitialCash(Quantity initialCash)
           
protected  void setInitialCoupons(Quantity initialCoupons)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Role

public Role()
Method Detail

requiresJudges

public boolean requiresJudges()

initializeFromProps

public void initializeFromProps(java.util.Properties props)

roleKeyword

public abstract java.lang.String roleKeyword()

initializeDormancy

public void initializeDormancy(boolean[] booleans)

getInitialCoupons

public Quantity getInitialCoupons()

setInitialCoupons

protected void setInitialCoupons(Quantity initialCoupons)

getInitialCash

public Quantity getInitialCash()

setInitialCash

protected void setInitialCash(Quantity initialCash)

needsUser

public boolean needsUser()

createSubject

public abstract AbstractSubject createSubject(User user,
                                              int rounds,
                                              java.lang.String playerName)

canBuy

public boolean canBuy()

canSell

public boolean canSell()

canBuy

public boolean canBuy(int round)

canSell

public boolean canSell(int round)

dormant

protected boolean dormant(int round)

dormantPeriods

public boolean[] dormantPeriods()