ch.sahits.game.openpatrician.model.player.IAIConstructionSelectionStrategyBiggestShipConstructionSelectionStrategy, RandomShipConstructionSelectionStrategypublic abstract class BaseShipConstructionSelectionStrategy
extends java.lang.Object
implements ch.sahits.game.openpatrician.model.player.IAIConstructionSelectionStrategy
| Modifier | Constructor | Description |
|---|---|---|
protected |
BaseShipConstructionSelectionStrategy(int minCash,
int maxFeetSize,
int maxTotalCargoCapacity) |
| Modifier and Type | Method | Description |
|---|---|---|
protected int |
getFleetCapacity(java.util.List<ch.sahits.game.openpatrician.model.ship.IShip> fleet) |
Calculate the fleets total capacity.
|
java.util.Optional<ch.sahits.game.openpatrician.model.ship.INavigableVessel> |
selectCollectingVessel(ch.sahits.game.openpatrician.model.IAIPlayer player,
ch.sahits.game.openpatrician.model.ship.EShipType shipType) |
|
boolean |
shouldOrderNewConstruction(ch.sahits.game.openpatrician.model.IAIPlayer player) |
Ship is ordered if enough cash is available and the fleet size and fleet capacity is below certain thresholds, as
defined at construction time.
|
protected BaseShipConstructionSelectionStrategy(int minCash,
int maxFeetSize,
int maxTotalCargoCapacity)
public boolean shouldOrderNewConstruction(ch.sahits.game.openpatrician.model.IAIPlayer player)
shouldOrderNewConstruction in interface ch.sahits.game.openpatrician.model.player.IAIConstructionSelectionStrategyplayer - for which the check should be done.protected int getFleetCapacity(java.util.List<ch.sahits.game.openpatrician.model.ship.IShip> fleet)
fleet - list of shipsfleetpublic java.util.Optional<ch.sahits.game.openpatrician.model.ship.INavigableVessel> selectCollectingVessel(ch.sahits.game.openpatrician.model.IAIPlayer player,
ch.sahits.game.openpatrician.model.ship.EShipType shipType)
selectCollectingVessel in interface ch.sahits.game.openpatrician.model.player.IAIConstructionSelectionStrategyCopyright © 2011-2018 Sahits GmbH. All Rights Reserved.