From: Erik V. <ev...@us...> - 2010-06-17 21:36:02
|
Update of /cvsroot/rails/18xx/rails/game/specific/_18EU In directory sfp-cvsdas-4.v30.ch3.sourceforge.com:/tmp/cvs-serv26332/rails/game/specific/_18EU Modified Files: StockRound_18EU.java Log Message: Fixed 1835 certificate ordering in IPO after Undo Index: StockRound_18EU.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/specific/_18EU/StockRound_18EU.java,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** StockRound_18EU.java 24 May 2010 11:20:42 -0000 1.40 --- StockRound_18EU.java 17 Jun 2010 21:35:54 -0000 1.41 *************** *** 113,117 **** /* Only the top certificate is buyable from the IPO */ ! cert = certs.get(0); comp = cert.getCompany(); if (isSaleRecorded(currentPlayer, comp)) continue; --- 113,127 ---- /* Only the top certificate is buyable from the IPO */ ! int lowestIndex = 99; ! cert = null; ! int index; ! for (PublicCertificateI c : certs) { ! index = c.getIndexInCompany(); ! if (index < lowestIndex) { ! lowestIndex = index; ! cert = c; ! } ! } ! comp = cert.getCompany(); if (isSaleRecorded(currentPlayer, comp)) continue; |