From: Erik V. <ev...@us...> - 2010-02-04 21:28:07
|
Update of /cvsroot/rails/18xx/rails/game In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv7192/rails/game Modified Files: Company.java CompanyType.java CompanyManager.java CompanyTypeI.java PublicCompany.java CompanyI.java CompanyManagerI.java PrivateCompany.java Log Message: Info: replaced Privates by Companies. Now covers all (private and public) company types, as defined in the XML. Info display also extended. 1830 and 1835 done, others remain. Index: CompanyI.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/CompanyI.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** CompanyI.java 16 Jan 2010 21:16:14 -0000 1.6 --- CompanyI.java 4 Feb 2010 21:27:58 -0000 1.7 *************** *** 22,26 **** /** * Returns the name of the Company ! * * @return the name of the Company */ --- 22,26 ---- /** * Returns the name of the Company ! * * @return the name of the Company */ *************** *** 30,37 **** public String getInfoText(); ! /** * Returns the CompanyType of the Company ! * * @return the type of the Company */ --- 30,37 ---- public String getInfoText(); ! /** * Returns the CompanyType of the Company ! * * @return the type of the Company */ *************** *** 40,44 **** /** * Returns the type name of the Company ! * * @return type name */ --- 40,44 ---- /** * Returns the type name of the Company ! * * @return type name */ Index: CompanyManager.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/CompanyManager.java,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** CompanyManager.java 31 Jan 2010 22:22:28 -0000 1.21 --- CompanyManager.java 4 Feb 2010 21:27:58 -0000 1.22 *************** *** 1 **** ! /* $Header$ */ package rails.game; import java.util.*; import org.apache.log4j.Logger; import rails.util.LocalText; import rails.util.Tag; public class CompanyManager implements CompanyManagerI, ConfigurableComponentI { /** A List with all private companies */ private List<PrivateCompanyI> lPrivateCompanies = new ArrayList<PrivateCompanyI>(); /** A List with all public companies */ private List<PublicCompanyI> lPublicCompanies = new ArrayList<PublicCompanyI>(); /** A map with all private companies by name */ private Map<String, PrivateCompanyI> mPrivateCompanies = new HashMap<String, PrivateCompanyI>(); /** A map with all public (i.e. non-private) companies by name */ private Map<String, PublicCompanyI> mPublicCompanies = new HashMap<String, PublicCompanyI>(); /** A map of all type names to maps of companies of that type by name */ // TODO Redundant, current usage can be replaced. private Map<String, HashMap<String, CompanyI>> mCompaniesByTypeAndName = new HashMap<String, HashMap<String, CompanyI>>(); /** A list of all start packets (usually one) */ private List<StartPacket> startPackets = new ArrayList<StartPacket>(); /** A map of all start packets, keyed by name. Default name is "Initial" */ private Map<String, StartPacket> startPacketMap = new HashMap<String, StartPacket>(); private int numberOfPublicCompanies = 0; protected static Logger log = Logger.getLogger(CompanyManager.class.getPackage().getName()); protected GameManagerI gameManager; /* * NOTES: 1. we don't have a map over all companies, because some games have * duplicate names, e.g. B&O in 1830. 2. we have both a map and a list of * private/public companies to preserve configuration sequence while * allowing direct access. */ /** * No-args constructor. */ public CompanyManager() { // Nothing to do here, everything happens when configured. } /** * @see rails.game.ConfigurableComponentI#configureFromXML(org.w3c.dom.Element) */ public void configureFromXML(Tag tag) throws ConfigurationException { gameManager = GameManager.getInstance(); /** A map with all company types, by type name */ // Localised here as it has no permanent use Map<String, CompanyTypeI> mCompanyTypes = new HashMap<String, CompanyTypeI>(); for (Tag compTypeTag : tag.getChildren(CompanyTypeI.ELEMENT_ID)) { // Extract the attributes of the Component String name = compTypeTag.getAttributeAsString(CompanyTypeI.NAME_TAG); if (name == null) { throw new ConfigurationException( LocalText.getText("UnnamedCompanyType")); } String className = compTypeTag.getAttributeAsString(CompanyTypeI.CLASS_TAG); if (className == null) { throw new ConfigurationException(LocalText.getText( "CompanyTypeHasNoClass", name)); } if (mCompanyTypes.get(name) != null) { throw new ConfigurationException(LocalText.getText( "CompanyTypeConfiguredTwice", name)); } CompanyTypeI companyType = new CompanyType(name, className); mCompanyTypes.put(name, companyType); // Further parsing is done within CompanyType companyType.configureFromXML(compTypeTag); } /* Read and configure the companies */ for (Tag companyTag : tag.getChildren(CompanyI.COMPANY_ELEMENT_ID)) { // Extract the attributes of the Component String name = companyTag.getAttributeAsString(CompanyI.COMPANY_NAME_TAG); if (name == null) { throw new ConfigurationException( LocalText.getText("UnnamedCompany")); } String type = companyTag.getAttributeAsString(CompanyI.COMPANY_TYPE_TAG); if (type == null) { throw new ConfigurationException(LocalText.getText( "CompanyHasNoType", name)); } CompanyTypeI cType = mCompanyTypes.get(type); if (cType == null) { throw new ConfigurationException(LocalText.getText( "CompanyHasUnknownType", name, type )); } try { CompanyI company = cType.createCompany(name, companyTag); /* Private or public */ if (company instanceof PrivateCompanyI) { mPrivateCompanies.put(name, (PrivateCompanyI) company); lPrivateCompanies.add((PrivateCompanyI) company); } else if (company instanceof PublicCompanyI) { ((PublicCompanyI)company).setIndex (numberOfPublicCompanies++); mPublicCompanies.put(name, (PublicCompanyI) company); lPublicCompanies.add((PublicCompanyI) company); } /* By type and name */ if (!mCompaniesByTypeAndName.containsKey(type)) mCompaniesByTypeAndName.put(type, new HashMap<String, CompanyI>()); ((Map<String, CompanyI>) mCompaniesByTypeAndName.get(type)).put( name, company); } catch (Exception e) { throw new ConfigurationException(LocalText.getText( "ClassCannotBeInstantiated", cType.getClassName()), e); } } /* Read and configure the start packets */ List<Tag> packetTags = tag.getChildren("StartPacket"); if (packetTags != null) { for (Tag packetTag : tag.getChildren("StartPacket")) { // Extract the attributes of the Component String name = packetTag.getAttributeAsString("name", StartPacket.DEFAULT_NAME); String roundClass = packetTag.getAttributeAsString("roundClass"); if (roundClass == null) { throw new ConfigurationException(LocalText.getText( "StartPacketHasNoClass", name)); } StartPacket sp = new StartPacket(name, roundClass); startPackets.add(sp); startPacketMap.put(name, sp); sp.configureFromXML(packetTag); } } } // Post XML parsing initialisations public void finishConfiguration (GameManagerI gameManager) throws ConfigurationException { for (PublicCompanyI comp : lPublicCompanies) { comp.finishConfiguration(gameManager); } for (PrivateCompanyI comp : lPrivateCompanies) { comp.finishConfiguration(gameManager); } } /** * @see rails.game.CompanyManagerI#getCompany(java.lang.String) * */ public PrivateCompanyI getPrivateCompany(String name) { return mPrivateCompanies.get(name); } public PublicCompanyI getPublicCompany(String name) { return mPublicCompanies.get(name); } public List<PrivateCompanyI> getAllPrivateCompanies() { return lPrivateCompanies; } public List<PublicCompanyI> getAllPublicCompanies() { return lPublicCompanies; } public PublicCompanyI getCompanyByName(String name) { for (int i = 0; i < lPublicCompanies.size(); i++) { PublicCompany co = (PublicCompany) lPublicCompanies.get(i); if (name.equalsIgnoreCase(co.getName())) { return lPublicCompanies.get(i); } } return null; } public CompanyI getCompany(String type, String name) { if (mCompaniesByTypeAndName.containsKey(type)) { return (mCompaniesByTypeAndName.get(type)).get(name); } else { return null; } } public void closeAllPrivates() { if (lPrivateCompanies == null) return; for (PrivateCompanyI priv : lPrivateCompanies) { priv.setClosed(); } } public List<PrivateCompanyI> getPrivatesOwnedByPlayers() { List<PrivateCompanyI> privatesOwnedByPlayers = new ArrayList<PrivateCompanyI>(); for (PrivateCompanyI priv : getAllPrivateCompanies()) { if (priv.getPortfolio().getOwner() instanceof Player) { privatesOwnedByPlayers.add(priv); } } return privatesOwnedByPlayers; } public StartPacket getStartPacket (int index) { return startPackets.get(index); } public StartPacket getStartPacket (String name) { return startPacketMap.get(name); } } \ No newline at end of file --- 1 ---- ! /* $Header$ */ package rails.game; import java.util.*; import org.apache.log4j.Logger; import rails.util.LocalText; import rails.util.Tag; public class CompanyManager implements CompanyManagerI, ConfigurableComponentI { /** A List with all private companies */ private List<PrivateCompanyI> lPrivateCompanies = new ArrayList<PrivateCompanyI>(); /** A List with all public companies */ private List<PublicCompanyI> lPublicCompanies = new ArrayList<PublicCompanyI>(); /** A map with all private companies by name */ private Map<String, PrivateCompanyI> mPrivateCompanies = new HashMap<String, PrivateCompanyI>(); /** A map with all public (i.e. non-private) companies by name */ private Map<String, PublicCompanyI> mPublicCompanies = new HashMap<String, PublicCompanyI>(); /** A map of all type names to maps of companies of that type by name */ // TODO Redundant, current usage can be replaced. private Map<String, Map<String, CompanyI>> mCompaniesByTypeAndName = new HashMap<String, Map<String, CompanyI>>(); /** A list of all company types */ private List<CompanyTypeI> lCompanyTypes = new ArrayList<CompanyTypeI>(); /** A list of all start packets (usually one) */ private List<StartPacket> startPackets = new ArrayList<StartPacket>(); /** A map of all start packets, keyed by name. Default name is "Initial" */ private Map<String, StartPacket> startPacketMap = new HashMap<String, StartPacket>(); private int numberOfPublicCompanies = 0; protected static Logger log = Logger.getLogger(CompanyManager.class.getPackage().getName()); protected GameManagerI gameManager; /* * NOTES: 1. we don't have a map over all companies, because some games have * duplicate names, e.g. B&O in 1830. 2. we have both a map and a list of * private/public companies to preserve configuration sequence while * allowing direct access. */ /** * No-args constructor. */ public CompanyManager() { // Nothing to do here, everything happens when configured. } /** * @see rails.game.ConfigurableComponentI#configureFromXML(org.w3c.dom.Element) */ public void configureFromXML(Tag tag) throws ConfigurationException { gameManager = GameManager.getInstance(); /** A map with all company types, by type name */ // Localised here as it has no permanent use Map<String, CompanyTypeI> mCompanyTypes = new HashMap<String, CompanyTypeI>(); for (Tag compTypeTag : tag.getChildren(CompanyTypeI.ELEMENT_ID)) { // Extract the attributes of the Component String name = compTypeTag.getAttributeAsString(CompanyTypeI.NAME_TAG); if (name == null) { throw new ConfigurationException( LocalText.getText("UnnamedCompanyType")); } String className = compTypeTag.getAttributeAsString(CompanyTypeI.CLASS_TAG); if (className == null) { throw new ConfigurationException(LocalText.getText( "CompanyTypeHasNoClass", name)); } if (mCompanyTypes.get(name) != null) { throw new ConfigurationException(LocalText.getText( "CompanyTypeConfiguredTwice", name)); } CompanyTypeI companyType = new CompanyType(name, className); mCompanyTypes.put(name, companyType); lCompanyTypes.add(companyType); // Further parsing is done within CompanyType companyType.configureFromXML(compTypeTag); } /* Read and configure the companies */ for (Tag companyTag : tag.getChildren(CompanyI.COMPANY_ELEMENT_ID)) { // Extract the attributes of the Component String name = companyTag.getAttributeAsString(CompanyI.COMPANY_NAME_TAG); if (name == null) { throw new ConfigurationException( LocalText.getText("UnnamedCompany")); } String type = companyTag.getAttributeAsString(CompanyI.COMPANY_TYPE_TAG); if (type == null) { throw new ConfigurationException(LocalText.getText( "CompanyHasNoType", name)); } CompanyTypeI cType = mCompanyTypes.get(type); if (cType == null) { throw new ConfigurationException(LocalText.getText( "CompanyHasUnknownType", name, type )); } try { CompanyI company = cType.createCompany(name, companyTag); /* Private or public */ if (company instanceof PrivateCompanyI) { mPrivateCompanies.put(name, (PrivateCompanyI) company); lPrivateCompanies.add((PrivateCompanyI) company); } else if (company instanceof PublicCompanyI) { ((PublicCompanyI)company).setIndex (numberOfPublicCompanies++); mPublicCompanies.put(name, (PublicCompanyI) company); lPublicCompanies.add((PublicCompanyI) company); } /* By type and name */ if (!mCompaniesByTypeAndName.containsKey(type)) mCompaniesByTypeAndName.put(type, new HashMap<String, CompanyI>()); (mCompaniesByTypeAndName.get(type)).put( name, company); } catch (Exception e) { throw new ConfigurationException(LocalText.getText( "ClassCannotBeInstantiated", cType.getClassName()), e); } } /* Read and configure the start packets */ List<Tag> packetTags = tag.getChildren("StartPacket"); if (packetTags != null) { for (Tag packetTag : tag.getChildren("StartPacket")) { // Extract the attributes of the Component String name = packetTag.getAttributeAsString("name", StartPacket.DEFAULT_NAME); String roundClass = packetTag.getAttributeAsString("roundClass"); if (roundClass == null) { throw new ConfigurationException(LocalText.getText( "StartPacketHasNoClass", name)); } StartPacket sp = new StartPacket(name, roundClass); startPackets.add(sp); startPacketMap.put(name, sp); sp.configureFromXML(packetTag); } } } // Post XML parsing initialisations public void finishConfiguration (GameManagerI gameManager) throws ConfigurationException { for (PublicCompanyI comp : lPublicCompanies) { comp.finishConfiguration(gameManager); } for (PrivateCompanyI comp : lPrivateCompanies) { comp.finishConfiguration(gameManager); } } /** * @see rails.game.CompanyManagerI#getCompany(java.lang.String) * */ public PrivateCompanyI getPrivateCompany(String name) { return mPrivateCompanies.get(name); } public PublicCompanyI getPublicCompany(String name) { return mPublicCompanies.get(name); } public List<PrivateCompanyI> getAllPrivateCompanies() { return lPrivateCompanies; } public List<PublicCompanyI> getAllPublicCompanies() { return lPublicCompanies; } public PublicCompanyI getCompanyByName(String name) { for (int i = 0; i < lPublicCompanies.size(); i++) { PublicCompany co = (PublicCompany) lPublicCompanies.get(i); if (name.equalsIgnoreCase(co.getName())) { return lPublicCompanies.get(i); } } return null; } public List<CompanyTypeI> getCompanyTypes() { return lCompanyTypes; } public CompanyI getCompany(String type, String name) { if (mCompaniesByTypeAndName.containsKey(type)) { return (mCompaniesByTypeAndName.get(type)).get(name); } else { return null; } } public void closeAllPrivates() { if (lPrivateCompanies == null) return; for (PrivateCompanyI priv : lPrivateCompanies) { priv.setClosed(); } } public List<PrivateCompanyI> getPrivatesOwnedByPlayers() { List<PrivateCompanyI> privatesOwnedByPlayers = new ArrayList<PrivateCompanyI>(); for (PrivateCompanyI priv : getAllPrivateCompanies()) { if (priv.getPortfolio().getOwner() instanceof Player) { privatesOwnedByPlayers.add(priv); } } return privatesOwnedByPlayers; } public StartPacket getStartPacket (int index) { return startPackets.get(index); } public StartPacket getStartPacket (String name) { return startPacketMap.get(name); } } \ No newline at end of file Index: PublicCompany.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/PublicCompany.java,v retrieving revision 1.81 retrieving revision 1.82 diff -C2 -d -r1.81 -r1.82 *** PublicCompany.java 3 Feb 2010 20:16:40 -0000 1.81 --- PublicCompany.java 4 Feb 2010 21:27:58 -0000 1.82 *************** *** 262,265 **** --- 262,266 ---- longName = tag.getAttributeAsString("longname", name); + infoText = "<html>"+longName; /* Configure public company features */ *************** *** 293,296 **** --- 294,298 ---- homeHexName = homeBaseTag.getAttributeAsString("hex"); homeCityNumber = homeBaseTag.getAttributeAsInteger("city", 1); + infoText += "<br>Home=" + homeHexName; } *************** *** 298,301 **** --- 300,304 ---- if (destinationTag != null) { destinationHexName = destinationTag.getAttributeAsString("hex"); + infoText += " Destination="+destinationHexName; } *************** *** 319,322 **** --- 322,333 ---- } + // Extra info text(usually related to extra-share special properties) + Tag infoTag = tag.getChild("Info"); + if (infoTag != null) { + String infoKey = infoTag.getAttributeAsString("key"); + String[] infoParms = infoTag.getAttributeAsString("parm", "").split(","); + infoText += "<br>"+LocalText.getText(infoKey, (Object[])infoParms); + } + // TODO Normally set in the default train type. May be wrong place. // Ridiculous to reparse with each train type. *************** *** 559,563 **** /** Initialisation, to be called directly after instantiation (cloning) */ @Override ! public void init(String name, CompanyTypeI type) { super.init(name, type); --- 570,574 ---- /** Initialisation, to be called directly after instantiation (cloning) */ @Override ! public void init(String name, CompanyTypeI type) { super.init(name, type); Index: PrivateCompany.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/PrivateCompany.java,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** PrivateCompany.java 3 Feb 2010 05:37:54 -0000 1.32 --- PrivateCompany.java 4 Feb 2010 21:27:58 -0000 1.33 *************** *** 44,48 **** /* Configure private company features */ try { ! longName= tag.getAttributeAsString("longName", ""); basePrice = tag.getAttributeAsInteger("basePrice", 0); --- 44,49 ---- /* Configure private company features */ try { ! longName= tag.getAttributeAsString("longname", name); ! infoText = "<html>"+longName; basePrice = tag.getAttributeAsInteger("basePrice", 0); *************** *** 55,58 **** --- 56,60 ---- blockedHexesString = blockedTag.getAttributeAsString("hex"); + infoText += "<br>Blocking "+blockedHexesString; } *************** *** 74,80 **** specialProperties.add(sp); sp.configureFromXML(spTag); } } ! // Extra info text(usually related to extra-share special properties) Tag infoTag = tag.getChild("Info"); --- 76,83 ---- specialProperties.add(sp); sp.configureFromXML(spTag); + infoText += "<br>" + sp.getInfo(); } } ! // Extra info text(usually related to extra-share special properties) Tag infoTag = tag.getChild("Info"); *************** *** 82,86 **** String infoKey = infoTag.getAttributeAsString("key"); String[] infoParms = infoTag.getAttributeAsString("parm", "").split(","); ! infoText = LocalText.getText(infoKey, (Object[])infoParms); } --- 85,89 ---- String infoKey = infoTag.getAttributeAsString("key"); String[] infoParms = infoTag.getAttributeAsString("parm", "").split(","); ! infoText += "<br>"+LocalText.getText(infoKey, (Object[])infoParms); } *************** *** 115,119 **** if (conditionText != null) { preventClosingConditions.add(conditionText); ! } } } --- 118,122 ---- if (conditionText != null) { preventClosingConditions.add(conditionText); ! } } } *************** *** 147,155 **** /** Initialisation, to be called directly after instantiation (cloning) */ @Override ! public void init(String name, CompanyTypeI type) { super.init(name, type); specialProperties = new ArrayList<SpecialPropertyI>(); ! /* start sfy 1889 */ preventClosingConditions = new ArrayList<String>(); --- 150,158 ---- /** Initialisation, to be called directly after instantiation (cloning) */ @Override ! public void init(String name, CompanyTypeI type) { super.init(name, type); specialProperties = new ArrayList<SpecialPropertyI>(); ! /* start sfy 1889 */ preventClosingConditions = new ArrayList<String>(); *************** *** 180,184 **** return revenue; } ! // start: sfy 1889: new method public int getRevenueByPhase(PhaseI phase){ --- 183,187 ---- return revenue; } ! // start: sfy 1889: new method public int getRevenueByPhase(PhaseI phase){ *************** *** 213,220 **** public void setClosed() { ! if (isClosed()) return; if (!isCloseable()) return; /* sfy 1889 */ ! ! super.setClosed(); unblockHexes(); moveTo(GameManager.getInstance().getBank().getScrapHeap()); --- 216,223 ---- public void setClosed() { ! if (isClosed()) return; if (!isCloseable()) return; /* sfy 1889 */ ! ! super.setClosed(); unblockHexes(); moveTo(GameManager.getInstance().getBank().getScrapHeap()); *************** *** 222,226 **** // For 1856: buyable tokens still owned by the private will now ! // become commonly buyable, i.e. owned by GameManager. // (Note: all such tokens will be made buyable from the Bank too, // this is done in OperatingRound_1856). --- 225,229 ---- // For 1856: buyable tokens still owned by the private will now ! // become commonly buyable, i.e. owned by GameManager. // (Note: all such tokens will be made buyable from the Bank too, // this is done in OperatingRound_1856). *************** *** 236,240 **** } } ! /* start sfy 1889 */ public boolean isCloseable() { --- 239,243 ---- } } ! /* start sfy 1889 */ public boolean isCloseable() { Index: CompanyType.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/CompanyType.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** CompanyType.java 31 Oct 2009 17:08:27 -0000 1.10 --- CompanyType.java 4 Feb 2010 21:27:58 -0000 1.11 *************** *** 2,5 **** --- 2,8 ---- package rails.game; + import java.util.ArrayList; + import java.util.List; + import rails.util.LocalText; import rails.util.Tag; *************** *** 23,27 **** private CompanyI dummyCompany; ! /** * The constructor. --- 26,32 ---- private CompanyI dummyCompany; ! ! protected List<CompanyI> companies = new ArrayList<CompanyI>(); ! /** * The constructor. *************** *** 60,68 **** } ! public void finishConfiguration (GameManagerI gameManager) { ! } ! public CompanyI createCompany(String name, Tag tag) throws ConfigurationException { --- 65,73 ---- } ! public void finishConfiguration (GameManagerI gameManager) { ! } ! public CompanyI createCompany(String name, Tag tag) throws ConfigurationException { *************** *** 75,78 **** --- 80,84 ---- newCompany.init(name, this); newCompany.configureFromXML(tag); + companies.add(newCompany); } catch (CloneNotSupportedException e) { DisplayBuffer.add(LocalText.getText("CantCloneCompany", *************** *** 101,105 **** } ! public void setCapitalisation(int mode) { this.capitalisation = mode; } --- 107,115 ---- } ! public List<CompanyI> getCompanies() { ! return companies; ! } ! ! public void setCapitalisation(int mode) { this.capitalisation = mode; } Index: Company.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/Company.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** Company.java 16 Jan 2010 21:15:58 -0000 1.12 --- Company.java 4 Feb 2010 21:27:58 -0000 1.13 *************** *** 40,44 **** this.type = type; closedObject = new BooleanState(name + "_Closed", false); - } --- 40,43 ---- *************** *** 88,92 **** return longName; } ! public String getInfoText(){ return infoText; --- 87,91 ---- return longName; } ! public String getInfoText(){ return infoText; Index: CompanyTypeI.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/CompanyTypeI.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** CompanyTypeI.java 4 Jun 2008 19:00:30 -0000 1.5 --- CompanyTypeI.java 4 Feb 2010 21:27:58 -0000 1.6 *************** *** 2,5 **** --- 2,7 ---- package rails.game; + import java.util.List; + import rails.util.Tag; *************** *** 40,43 **** --- 42,47 ---- public String getClassName(); + public List<CompanyI> getCompanies(); + public void setCapitalisation(int mode); Index: CompanyManagerI.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/CompanyManagerI.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** CompanyManagerI.java 9 Oct 2009 20:20:34 -0000 1.13 --- CompanyManagerI.java 4 Feb 2010 21:27:58 -0000 1.14 *************** *** 56,59 **** --- 56,60 ---- public PublicCompanyI getCompanyByName(String name); + public List<CompanyTypeI> getCompanyTypes(); public void closeAllPrivates(); |