public void placeBridge(Location bridgeLoc) { assert bridge == null && bridgeLoc != null; // TODO AI support - remove bridge from tile Location normalizedLoc = bridgeLoc.rotateCCW(rotation); bridge = new Bridge(); bridge.setId(game.idSequnceNextVal()); bridge.setTile(this); bridge.setLocation(normalizedLoc); features.add(bridge); edgePattern = edgePattern.getBridgePattern(normalizedLoc); }
public boolean isBridgeAllowed(Location bridgeLoc) { if (origin == Expansion.COUNT || getBridge() != null) return false; return edgePattern.isBridgeAllowed(bridgeLoc, rotation); }