use of games.strategy.triplea.delegate.AbstractPlaceDelegate in project triplea by triplea-game.
the class ProPurchaseUtils method canUnitsBePlaced.
public static boolean canUnitsBePlaced(final List<Unit> units, final PlayerID player, final Territory t, final boolean isBid) {
final GameData data = ProData.getData();
AbstractPlaceDelegate placeDelegate = (AbstractPlaceDelegate) data.getDelegateList().getDelegate("place");
if (isBid) {
placeDelegate = (AbstractPlaceDelegate) data.getDelegateList().getDelegate("placeBid");
}
final IDelegateBridge bridge = new ProDummyDelegateBridge(ProData.getProAi(), player, data);
placeDelegate.setDelegateBridgeAndPlayer(bridge);
final String s = placeDelegate.canUnitsBePlaced(t, units, player);
return s == null;
}
Aggregations