Пример #1
0
 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);
 }
Пример #2
0
 public boolean isBridgeAllowed(Location bridgeLoc) {
   if (origin == Expansion.COUNT || getBridge() != null) return false;
   return edgePattern.isBridgeAllowed(bridgeLoc, rotation);
 }