From: Erik V. <ev...@us...> - 2009-01-08 19:59:51
|
Update of /cvsroot/rails/18xx/rails/game/action In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv15164/rails/game/action Modified Files: BuyOrBidStartItem.java Log Message: Start item status tooltips & colours Index: BuyOrBidStartItem.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/action/BuyOrBidStartItem.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** BuyOrBidStartItem.java 4 Jun 2008 19:00:29 -0000 1.10 --- BuyOrBidStartItem.java 8 Jan 2009 19:59:39 -0000 1.11 *************** *** 1,4 **** /* $Header$ ! * * Created on 17-Sep-2006 * Change Log: --- 1,4 ---- /* $Header$ ! * * Created on 17-Sep-2006 * Change Log: *************** *** 22,30 **** private boolean sharePriceToSet = false; private String companyNeedingSharePrice = null; ! /** ! * Selectable means that a player can select but not buy it. In this case ! * "Pass" means "Select but no buy". ! */ ! private boolean selectable = false; private int type; --- 22,26 ---- private boolean sharePriceToSet = false; private String companyNeedingSharePrice = null; ! /** Unused but retained to keep old saved files loadable */ private int type; *************** *** 50,61 **** public static final int SET_SHARE_PRICE = 6; - public static final String[] typeNames = - new String[] { "", "BuyImmediate", "SelectAndBuy", "BidImmediate", - "SelectAndBid", "SelectAndBidOrPass", "SetSharePrice" }; - public static final long serialVersionUID = 2L; /** ! * */ public BuyOrBidStartItem(StartItem startItem, int priceOrMinimumBid, --- 46,53 ---- public static final int SET_SHARE_PRICE = 6; public static final long serialVersionUID = 2L; /** ! * */ public BuyOrBidStartItem(StartItem startItem, int priceOrMinimumBid, *************** *** 68,73 **** this.priceOrMinimumBid = priceOrMinimumBid; - setType(type); - PublicCompanyI company; if ((company = startItem.needsPriceSetting()) != null) { --- 60,63 ---- *************** *** 88,102 **** } - /** @deprecated */ - /* ???? */ - public BuyOrBidStartItem setSelectable(boolean value) { - selectable = value; - return this; - } - - public boolean isSelectable() { - return selectable; - } - public int getBidIncrement() { return bidIncrement; --- 78,81 ---- *************** *** 135,152 **** } ! /** @deprecated */ ! public int getStatus() { ! // if (startItem == null) return 0;//BAD ! return startItem.getStatus(); ! } ! ! public int getType() { ! return type; ! } ! ! public void setType(int type) { ! this.type = type; ! } ! public boolean equals(PossibleAction action) { if (!(action instanceof BuyOrBidStartItem)) return false; --- 114,118 ---- } ! @Override public boolean equals(PossibleAction action) { if (!(action instanceof BuyOrBidStartItem)) return false; *************** *** 156,167 **** } public String toString() { StringBuffer b = new StringBuffer(); ! b.append("BuyOrBidStartItem ").append(startItemName).append(" type=").append( ! typeNames[type]).append(" status="); ! if (selectable) b.append("Selectable/"); b.append(startItem.getStatusName()); ! switch (getStatus()) { case StartItem.BIDDABLE: b.append(" minbid=").append(priceOrMinimumBid).append(" bid=").append( --- 122,132 ---- } + @Override public String toString() { StringBuffer b = new StringBuffer(); ! b.append("BuyOrBidStartItem ").append(startItemName).append(" status="); b.append(startItem.getStatusName()); ! switch (startItem.getStatus()) { case StartItem.BIDDABLE: b.append(" minbid=").append(priceOrMinimumBid).append(" bid=").append( |