From: Erik V. <eri...@xs...> - 2012-03-18 15:26:40
|
Pushed to master. From: Dr....@t-... [mailto:Dr....@t-...] Sent: Saturday, March 17, 2012 11:05 PM To: Rails Development Subject: [Rails-devel] Rails 1.7-0-1880 alpha3 avail Hi, i have fixed the reported bugs by Phil Davies in the following alpha-Release. Please find the fixes enclosed in this mail. The package can be found for testing at : http://dl.dropbox.com/u/29072620/rails-1.7.0-1880-alpha3.zip Kind Regards, Martin Autor: Martin Brumm <Dr....@t-...> 2012-03-17 22:35:04 Eintragender: Martin Brumm <Dr....@t-...> 2012-03-17 22:35:04 Eltern: 457a77d344caf6f33031547de95fcb9992db758f (Fixed Spelling of Vladivostok in OffBoardRevenue_1880) Zweig: master Folgt auf: v1.5.0 Fixed the startprice but didnt remove the pop up for IG/BCR Fixed the bid problem reported by Phil Davies The StartPrice Problematic with a fixed price but needed BuildingRight will need some more thinking. I am currently using the NeedSharePrice Status to trigger the Setting of Prices and BuildingRights... Maybe i have to add another StatusFlag :( ---------------- rails/game/specific/_1880/StartRound_1880.java ---------------- index d906796..9c2ecde 100644 @@ -240,8 +240,25 @@ public class StartRound_1880 extends StartRound { Bank.format(bidAmount), item.getName(), Bank.format(player.getCash()) )); + if ((item.getBidders() >0) && (numPasses.intValue()== getNumberOfPlayers()-1)) { + // All but the highest bidder have passed. + int price = item.getBid(); + + log.debug("Highest bidder is " + + item.getBidder().getName()); + if (item.needsPriceSetting() != null) { + item.setStatus(StartItem.NEEDS_SHARE_PRICE); + } else { + assignItem(item.getBidder(), item, price, 0); + } + auctionItemState.set(null); + numPasses.set(0); + setNextStartingPlayer(); + return true; + } else { setNextBiddingPlayer(item); return true; + } } @@ -294,17 +311,15 @@ public class StartRound_1880 extends StartRound { assignItem((Player)startingPlayer.get(), auctionItem, 0, 0); setNextStartingPlayer(); - // startPacket.getFirstItem().getName()); return true; } } else { numPasses.set(0); - //gameManager.nextRound(this); finishRound(); } } - // if ((numPasses.intValue() >= auctionItem.getBidders() - 1) && + if ((auctionItem.getBidders() >0) && (numPasses.intValue()== getNumberOfPlayers()-1)) { // All but the highest bidder have passed. int price = auctionItem.getBid(); --------- rails/ui/swing/gamespecific/_1880/StartRoundWindow_1880.java --------- index dc264d2..7683295 100644 @@ -77,22 +77,22 @@ public class StartRoundWindow_1880 extends StartRoundWindow { // Get a sorted prices List // TODO: should be included in BuyStartItem - List<StockSpaceI> startSpaces = stockMarket.getStartSpaces(); - Map<Integer, StockSpaceI> spacePerPrice = - new HashMap<Integer, StockSpaceI>(); - startPrices = new int[startSpaces.size()]; - String[] options = new String[startSpaces.size()]; - for (int i = 0; i < startSpaces.size(); i++) { - if (((StockMarket_1880) stockMarket).getParSlot(startSpaces.get(i).getPrice())) { //Make sure we got a Parslot left over - startPrices[i] = startSpaces.get(i).getPrice(); - spacePerPrice.put(startPrices[i], startSpaces.get(i)); - } - } - Arrays.sort(startPrices); - for (int i = 0; i < startSpaces.size(); i++) { - options[i] = Bank.format(spacePerPrice.get(startPrices[i]).getPrice()); - } - +// List<StockSpaceI> startSpaces = stockMarket.getStartSpaces(); +// Map<Integer, StockSpaceI> spacePerPrice = +// new HashMap<Integer, StockSpaceI>(); +// startPrices = new int[startSpaces.size()]; + String[] options = {""}; +// for (int i = 0; i < startSpaces.size(); i++) { +// if (((StockMarket_1880) stockMarket).getParSlot(startSpaces.get(i).getPrice())) { //Make sure we got a Parslot left over +// startPrices[i] = startSpaces.get(i).getPrice(); +// spacePerPrice.put(startPrices[i], startSpaces.get(i)); +// } +// } +// Arrays.sort(startPrices); +// for (int i = 0; i < startSpaces.size(); i++) { +// options[i] = Bank.format(spacePerPrice.get(startPrices[i]).getPrice()); +// } + options[0] = "100"; RadioButtonDialog dialog = new RadioButtonDialog( COMPANY_START_PRICE_DIALOG, this, @@ -102,7 +102,7 @@ public class StartRoundWindow_1880 extends StartRoundWindow { activeItem.getPlayerName(), compName), options, - -1); + 0); setCurrentDialog (dialog, activeItem); } return true; @@ -143,7 +143,7 @@ public class StartRoundWindow_1880 extends StartRoundWindow { int index = dialog.getSelectedOption(); if (index >= 0) { - int price = startPrices[index]; + int price = 100; action.setAssociatedSharePrice(price); ((StockMarket_1880) stockMarket).setParSlot(price); Autor: Martin Brumm <Dr....@t-...> 2012-03-17 21:46:15 Eintragender: Martin Brumm <Dr....@t-...> 2012-03-17 21:46:15 Eltern: c04dd80f6970197d123f1493f4f3c0d5f602d560 (Added missing check for running company to 1880 public company modifier) Kind: a384f297999ccc2de0d66a1c9d836b37d6e45dd8 (Fixed the startprice but didnt remove the pop up for IG/BCR) Zweig: master Folgt auf: v1.5.0 Vorgänger von: Fixed Spelling of Vladivostok in OffBoardRevenue_1880 --------- rails/game/specific/_1880/OffBoardRevenueModifier_1880.java --------- index 7580a5c..d8cbf97 100644 @@ -29,7 +29,7 @@ public class OffBoardRevenueModifier_1880 implements RevenueStaticModifier { // 1. get the two off-board type stations (Russia and Wladiwostok) Set<NetworkVertex> offBoard = new HashSet<NetworkVertex>(); for (NetworkVertex vertex:revenueAdapter.getVertices()) { // We just need the two offboard Cities - if (vertex.isStation() && ((vertex.getStation().getName().equals("Russia") ||(vertex.getStation().getName().equals("Wladiwostok"))))) { + if (vertex.isStation() && ((vertex.getStation().getName().equals("Russia") ||(vertex.getStation().getName().equals("Vladivostok"))))) { offBoard.add(vertex); } } |