From: Erik V. <ev...@us...> - 2009-01-07 21:03:36
|
Update of /cvsroot/rails/18xx/rails/game In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv20068/rails/game Modified Files: StartItem.java Log Message: Added start packet item info to the StartRoundWindow. Index: StartItem.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/StartItem.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** StartItem.java 23 Dec 2008 19:57:47 -0000 1.14 --- StartItem.java 7 Jan 2009 21:03:24 -0000 1.15 *************** *** 2,8 **** package rails.game; ! import java.util.HashMap; ! import java.util.List; ! import java.util.Map; import org.apache.log4j.Logger; --- 2,6 ---- package rails.game; ! import java.util.*; import org.apache.log4j.Logger; *************** *** 10,14 **** import rails.game.model.ModelObject; import rails.game.model.MoneyModel; ! import rails.game.state.*; /** --- 8,12 ---- import rails.game.model.ModelObject; import rails.game.model.MoneyModel; ! import rails.game.state.IntegerState; /** *************** *** 82,86 **** * certificate. The parameters are only stored, real initialisation is done * by the init() method. ! * * @param name The Company name of the primary certificate. This name will * also become the name of the start item itself. --- 80,84 ---- * certificate. The parameters are only stored, real initialisation is done * by the init() method. ! * * @param name The Company name of the primary certificate. This name will * also become the name of the start item itself. *************** *** 109,113 **** /** * Add a secondary certificate, that "comes with" the primary certificate. ! * * @param name2 The Company name of the secondary certificate. * @param type2 The CompanyType name of the secondary certificate. --- 107,111 ---- /** * Add a secondary certificate, that "comes with" the primary certificate. ! * * @param name2 The Company name of the secondary certificate. * @param type2 The CompanyType name of the secondary certificate. *************** *** 184,188 **** * Set the start packet row. <p> Applies to games like 1835 where start * items are organised and become available in rows. ! * * @param row */ --- 182,186 ---- * Set the start packet row. <p> Applies to games like 1835 where start * items are organised and become available in rows. ! * * @param row */ *************** *** 194,198 **** * Set the start packet row. <p> Applies to games like 1837 where start * items are organised and become available in columns. ! * * @param row */ --- 192,196 ---- * Set the start packet row. <p> Applies to games like 1837 where start * items are organised and become available in columns. ! * * @param row */ *************** *** 203,207 **** /** * Get the row number. ! * * @see setRow() * @return The row number. Default 0. --- 201,205 ---- /** * Get the row number. ! * * @see setRow() * @return The row number. Default 0. *************** *** 213,217 **** /** * Get the column number. ! * * @see setColumn() * @return The column number. Default 0. --- 211,215 ---- /** * Get the column number. ! * * @see setColumn() * @return The column number. Default 0. *************** *** 223,227 **** /** * Get the primary (or only) certificate. ! * * @return The primary certificate object. */ --- 221,225 ---- /** * Get the primary (or only) certificate. ! * * @return The primary certificate object. */ *************** *** 232,236 **** /** * Check if there is a secondary certificate. ! * * @return True if there is a secondary certificate. */ --- 230,234 ---- /** * Check if there is a secondary certificate. ! * * @return True if there is a secondary certificate. */ *************** *** 241,245 **** /** * Get the secondary certificate. ! * * @return The secondary certificate object, or null if it does not exist. */ --- 239,243 ---- /** * Get the secondary certificate. ! * * @return The secondary certificate object, or null if it does not exist. */ *************** *** 250,254 **** /** * Get the start item base price. ! * * @return The base price. */ --- 248,252 ---- /** * Get the start item base price. ! * * @return The base price. */ *************** *** 264,268 **** * Get the start item name (which is the company name of the primary * certificate). ! * * @return The start item name. */ --- 262,266 ---- * Get the start item name (which is the company name of the primary * certificate). ! * * @return The start item name. */ *************** *** 274,278 **** * Register a bid. <p> This method does <b>not</b> check off the amount of * money that a player has available for bidding. ! * * @param amount The bid amount. * @param bidder The bidding player. --- 272,276 ---- * Register a bid. <p> This method does <b>not</b> check off the amount of * money that a player has available for bidding. ! * * @param amount The bid amount. * @param bidder The bidding player. *************** *** 298,302 **** /** * Get the currently highest bid amount. ! * * @return The bid amount (0 if there have been no bids yet). */ --- 296,300 ---- /** * Get the currently highest bid amount. ! * * @return The bid amount (0 if there have been no bids yet). */ *************** *** 312,316 **** /** * Get the highest bid done so far by a particular player. ! * * @param player The name of the player. * @return The bid amount for this player (default 0). --- 310,314 ---- /** * Get the highest bid done so far by a particular player. ! * * @param player The name of the player. * @return The bid amount for this player (default 0). *************** *** 324,328 **** * Return the total number of players that has done bids so far on this * item. ! * * @return The number of bidders. */ --- 322,326 ---- * Return the total number of players that has done bids so far on this * item. ! * * @return The number of bidders. */ *************** *** 337,341 **** /** * Get the highest bidder so far. ! * * @return The player object that did the highest bid. */ --- 335,339 ---- /** * Get the highest bidder so far. ! * * @return The player object that did the highest bid. */ *************** *** 351,355 **** /** * Get the minimum allowed next bid. TODO 5 should be configurable. ! * * @return Minimum bid */ --- 349,353 ---- /** * Get the minimum allowed next bid. TODO 5 should be configurable. ! * * @return Minimum bid */ *************** *** 364,368 **** /** * Check if a player has done any bids on this start item. ! * * @param playerName The name of the player. * @return True if this player has done any bids. --- 362,366 ---- /** * Check if a player has done any bids on this start item. ! * * @param playerName The name of the player. * @return True if this player has done any bids. *************** *** 376,380 **** /** * Get the last Bid done by a given player. ! * * @param playerName The name of the player. * @return His latest Bid object. --- 374,378 ---- /** * Get the last Bid done by a given player. ! * * @param playerName The name of the player. * @return His latest Bid object. *************** *** 388,392 **** /** * Check if the start item has been sold. ! * * @return True if this item has been sold. */ --- 386,390 ---- /** * Check if the start item has been sold. ! * * @return True if this item has been sold. */ *************** *** 397,401 **** /** * Set the start item sold status. ! * * @param sold The new sold status (usually true). */ --- 395,399 ---- /** * Set the start item sold status. ! * * @param sold The new sold status (usually true). */ *************** *** 423,427 **** * price immediately, so bypassing the extra "price asking" intermediate * step. ! * * @return A public company for which a price must be set. */ --- 421,425 ---- * price immediately, so bypassing the extra "price asking" intermediate * step. ! * * @return A public company for which a price must be set. */ *************** *** 442,446 **** * If a start item component a President's certificate that needs price * setting, return the name of thecompany for which the price must be set. ! * * @param certificate * @return Name of public company, or null --- 440,444 ---- * If a start item component a President's certificate that needs price * setting, return the name of thecompany for which the price must be set. ! * * @param certificate * @return Name of public company, or null *************** *** 477,489 **** public ModelObject getBasePriceModel() { ! return (ModelObject) basePrice; } public ModelObject getBidForPlayerModel(int index) { ! return (ModelObject) bids[index]; } public ModelObject getMinimumBidModel() { ! return (ModelObject) minimumBid; } --- 475,487 ---- public ModelObject getBasePriceModel() { ! return basePrice; } public ModelObject getBidForPlayerModel(int index) { ! return bids[index]; } public ModelObject getMinimumBidModel() { ! return minimumBid; } *************** *** 502,506 **** && this.type.equals(item.getType()); } ! public String toString() { return ("StartItem "+name+" status="+statusName[status.intValue()]); --- 500,505 ---- && this.type.equals(item.getType()); } ! ! @Override public String toString() { return ("StartItem "+name+" status="+statusName[status.intValue()]); |