ch.sahits.game.openpatrician.model.player.IAIBuyWeaponStrategyBuyWeaponHighPirateActivityHalfSlotsFilledStrategy, BuyWeaponHighPirateSuccessAllSlotsFilledStrategy, BuyWeaponHighPirateSuccessHalfSlotsFilledStrategypublic abstract class BaseBuyWeaponStrategy
extends java.lang.Object
implements ch.sahits.game.openpatrician.model.player.IAIBuyWeaponStrategy
| Constructor | Description |
|---|---|
BaseBuyWeaponStrategy() |
| Modifier and Type | Method | Description |
|---|---|---|
protected ch.sahits.game.openpatrician.model.weapon.EWeapon |
buyLargeWeapon(ch.sahits.game.openpatrician.model.weapon.IArmory armory,
int capacity) |
Randomly select a large weapon available in the armory and buy it.
|
protected ch.sahits.game.openpatrician.model.weapon.EWeapon |
buySmallWeapon(ch.sahits.game.openpatrician.model.weapon.IArmory armory,
int capacity) |
Randomly select a small weapon available in the armory and buy it.
|
void |
buyWeapons(ch.sahits.game.openpatrician.model.player.BuyWeapons target,
ch.sahits.game.openpatrician.model.ship.IShip ship,
ch.sahits.game.openpatrician.model.IAIPlayer player,
ch.sahits.game.openpatrician.model.city.ICity city) |
First the hand weapons are bought.
|
protected int |
getNumberOfEmptyLargeWeaponSlots(ch.sahits.game.openpatrician.model.ship.IShip ship) |
Count the empty large weapon slots, where a large weapon can be placed.
|
protected int |
getNumberOfEmptyWeaponSlots(ch.sahits.game.openpatrician.model.ship.IShip ship) |
Count the empty weapon slots.
|
protected int |
getNumberOfWeaponSlots(ch.sahits.game.openpatrician.model.ship.IShip ship) |
Retrieve the number of weapon slots on the ship.
|
protected int |
getWeaponAmount(ch.sahits.game.openpatrician.model.weapon.IArmory armory,
ch.sahits.game.openpatrician.model.weapon.EWeapon weapon) |
Retrieve the amount of weapons available in the armory.
|
protected int getNumberOfWeaponSlots(ch.sahits.game.openpatrician.model.ship.IShip ship)
protected int getNumberOfEmptyWeaponSlots(ch.sahits.game.openpatrician.model.ship.IShip ship)
protected int getNumberOfEmptyLargeWeaponSlots(ch.sahits.game.openpatrician.model.ship.IShip ship)
ship - for which to retrieve the empty slotsprotected int getWeaponAmount(ch.sahits.game.openpatrician.model.weapon.IArmory armory,
ch.sahits.game.openpatrician.model.weapon.EWeapon weapon)
protected ch.sahits.game.openpatrician.model.weapon.EWeapon buyLargeWeapon(ch.sahits.game.openpatrician.model.weapon.IArmory armory,
int capacity)
armory - from which to buy weaponsprotected ch.sahits.game.openpatrician.model.weapon.EWeapon buySmallWeapon(ch.sahits.game.openpatrician.model.weapon.IArmory armory,
int capacity)
armory - from which to buy weaponspublic void buyWeapons(ch.sahits.game.openpatrician.model.player.BuyWeapons target,
ch.sahits.game.openpatrician.model.ship.IShip ship,
ch.sahits.game.openpatrician.model.IAIPlayer player,
ch.sahits.game.openpatrician.model.city.ICity city)
buyWeapons in interface ch.sahits.game.openpatrician.model.player.IAIBuyWeaponStrategytarget - defining the target that should be met by buying the weapons.ship - for which the weapons should be boughtplayer - who is purchasing the weaponscity - in which to buy weaponsCopyright © 2011-2018 Sahits GmbH. All Rights Reserved.