Update of /cvsroot/rails/18xx/rails/game
In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv14635/rails/game
Modified Files:
PublicCompanyI.java PublicCompany.java
Log Message:
Added canUseSpecialProperties() to enable excluding 1835 minors for using SPs.
(Not yet used)
Index: PublicCompany.java
===================================================================
RCS file: /cvsroot/rails/18xx/rails/game/PublicCompany.java,v
retrieving revision 1.83
retrieving revision 1.84
diff -C2 -d -r1.83 -r1.84
*** PublicCompany.java 5 Feb 2010 19:56:32 -0000 1.83
--- PublicCompany.java 9 Feb 2010 20:02:02 -0000 1.84
***************
*** 148,151 ****
--- 148,153 ----
protected boolean canBuyPrivates = false;
+ protected boolean canUseSpecialProperties = false;
+
/**
* Minimum price for buying privates, to be multiplied by the original price
***************
*** 320,323 ****
--- 322,328 ----
}
+ Tag canUseSpecTag = tag.getChild("CanUseSpecialProperties");
+ if (canUseSpecTag != null) canUseSpecialProperties = true;
+
// Extra info text(usually related to extra-share special properties)
Tag infoTag = tag.getChild("Info");
***************
*** 1339,1343 ****
}
! /**
* Get the unit of share.
*
--- 1344,1352 ----
}
! public boolean canUseSpecialProperties() {
! return canUseSpecialProperties;
! }
!
! /**
* Get the unit of share.
*
Index: PublicCompanyI.java
===================================================================
RCS file: /cvsroot/rails/18xx/rails/game/PublicCompanyI.java,v
retrieving revision 1.44
retrieving revision 1.45
diff -C2 -d -r1.44 -r1.45
*** PublicCompanyI.java 3 Feb 2010 20:16:40 -0000 1.44
--- PublicCompanyI.java 9 Feb 2010 20:02:02 -0000 1.45
***************
*** 59,62 ****
--- 59,63 ----
*/
public boolean canBuyPrivates();
+ public boolean canUseSpecialProperties();
public boolean mustHaveOperatedToTradeShares();
***************
*** 254,258 ****
public void updatePlayersWorth();
!
public boolean isSplitAllowed();
--- 255,259 ----
public void updatePlayersWorth();
!
public boolean isSplitAllowed();
|