From: <ev...@us...> - 2011-06-09 22:04:39
|
Revision: 1571 http://rails.svn.sourceforge.net/rails/?rev=1571&view=rev Author: evos Date: 2011-06-09 22:04:33 +0000 (Thu, 09 Jun 2011) Log Message: ----------- Allow special tile lay of an unspecified tile (for 1889 D private) Modified Paths: -------------- trunk/18xx/rails/game/OperatingRound.java Modified: trunk/18xx/rails/game/OperatingRound.java =================================================================== --- trunk/18xx/rails/game/OperatingRound.java 2011-06-07 15:44:23 UTC (rev 1570) +++ trunk/18xx/rails/game/OperatingRound.java 2011-06-09 22:04:33 UTC (rev 1571) @@ -446,6 +446,11 @@ protected boolean checkNormalTileLay(TileI tile, boolean update) { + // Unspecified tile (e.g. 1889 D private, which is free on mountains) + if (tile == null) { + return !tileLaysPerColour.isEmpty(); + } + String colour = tile.getColourName(); Integer oldAllowedNumberObject = tileLaysPerColour.get(colour); @@ -1413,8 +1418,7 @@ if (stl.isExtra() // If the special tile lay is not extra, it is only allowed if // normal tile lays are also (still) allowed - || stl.getTile() != null - && checkNormalTileLay(stl.getTile(), false)) { + || checkNormalTileLay(stl.getTile(), false)) { LayTile lt = new LayTile(stl); String[] stlc = stl.getTileColours(); if (stlc != null) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |