games.strategy.triplea.delegate
Class PlaceDelegate

java.lang.Object
  extended by games.strategy.triplea.delegate.AbstractPlaceDelegate
      extended by games.strategy.triplea.delegate.PlaceDelegate
All Implemented Interfaces:
IDelegate, IRemote, IAbstractPlaceDelegate

public class PlaceDelegate
extends AbstractPlaceDelegate

Logic for placing units.

Version:
1.0 Known limitations. Doesnt take into account limits on number of factories that can be produced. The situation where one has two non original factories a,b each with production 2. If sea zone e neighbors a,b and sea zone f neighbors b. Then producing 2 in e could make it such that you cannot produce in f The reason is that the production in e could be assigned to the factory in b, leaving no capacity to produce in f. If anyone ever accidently runs into this situation then they can undo the production, produce in f first, and then produce in e.
Author:
Sean Bridges

Field Summary
 
Fields inherited from class games.strategy.triplea.delegate.AbstractPlaceDelegate
m_data, m_produced
 
Constructor Summary
PlaceDelegate()
           
 
Method Summary
protected  int getProduction(Territory territory)
           
 
Methods inherited from class games.strategy.triplea.delegate.AbstractPlaceDelegate
canProduce, canUnitsBePlaced, checkProduction, end, getData, getDisplayName, getMaxUnitsToBePlaced, getName, getPlaceableUnits, getPlacementsMade, getRemoteType, getTerritoriesWhereAirCantLand, getUnitsToBePlacedLand, getUnitsToBePlacedSea, initialize, initialize, isUnitPlacementInEnemySeas, isValidPlacement, isWW2V2, loadState, placeUnits, saveState, start, undoLastPlacement
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PlaceDelegate

public PlaceDelegate()
Method Detail

getProduction

protected int getProduction(Territory territory)
Overrides:
getProduction in class AbstractPlaceDelegate
Returns:
gets the production of the territory, ignores wether the territory was an original factory