From: Erik V. <ev...@us...> - 2009-01-21 20:18:33
|
Update of /cvsroot/rails/18xx/rails/game/action In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv26428/rails/game/action Modified Files: RepayLoans.java Log Message: Added 1856 loan repayment step at end of OR. Index: RepayLoans.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/action/RepayLoans.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** RepayLoans.java 11 Jan 2009 17:24:46 -0000 1.1 --- RepayLoans.java 21 Jan 2009 20:18:24 -0000 1.2 *************** *** 20,23 **** --- 20,24 ---- transient private PublicCompanyI company; private String companyName; + private int minNumber; private int maxNumber; private int price; *************** *** 31,43 **** * */ ! public RepayLoans(PublicCompanyI company, int maxNumber, int price) { this.company = company; this.companyName = company.getName(); this.maxNumber = maxNumber; this.price = price; } /** * @return Returns the minimumPrice. --- 32,49 ---- * */ ! public RepayLoans(PublicCompanyI company, int minNumber, int maxNumber, int price) { this.company = company; this.companyName = company.getName(); + this.minNumber = minNumber; this.maxNumber = maxNumber; this.price = price; } + public int getMinNumber() { + return minNumber; + } + /** * @return Returns the minimumPrice. *************** *** 63,66 **** --- 69,76 ---- } + public int getNumberRepaid() { + return numberRepaid; + } + @Override public boolean equals(PossibleAction action) { *************** *** 68,71 **** --- 78,82 ---- RepayLoans a = (RepayLoans) action; return a.company == company + && a.minNumber == minNumber && a.maxNumber == maxNumber && a.price == price; *************** *** 76,79 **** --- 87,91 ---- StringBuffer b = new StringBuffer(); b.append ("RepayLoans ").append(company.getName()) + .append(" minNumber=").append(minNumber) .append(" maxNumber=").append(maxNumber) .append(" value=").append(price); |