/* ********************************** * ReofferAgent.java * Reoffers a derivitive (when there are none to buy) * **********************************/ package player.playeragent; import gen.*; import player.*; /** Class for reoffering a list of derivatives */ public class ReofferAgent { /** Minimum Price Decrement... */ private static double minAmt = Util.getMinPriceDec(); /** Reoffers a given Derivative */ public Derivative reofferDerivative(Derivative der, PlayerID pid){ double price = der.price.val - minAmt; Util.display(Util.color("Reoffering","green")+" "+Util.tag(der.type.print(),"b")+" @ "+ Util.color(Util.format(price > 0 ? price : 0.0), "blue")); return der.reoffer(pid, new Price(price > 0 ? price : 0.0)); } }