public abstract class BaseJoinGuildStrategy extends Object implements ch.sahits.game.openpatrician.model.player.IAIGuildJoinStrategy
| Modifier and Type | Field and Description |
|---|---|
private static int |
ENTRY_FEE_FACTOR |
private ch.sahits.game.openpatrician.model.city.guild.GuildList |
guildList |
private GuildService |
guildService |
| Constructor and Description |
|---|
BaseJoinGuildStrategy() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract boolean |
additionalJoinRequirementsMet(ch.sahits.game.openpatrician.model.IAIPlayer player,
ch.sahits.game.openpatrician.model.city.ICity city,
Optional<ch.sahits.game.openpatrician.model.ship.INavigableVessel> vessel)
Additional requirients added by custom strategies.
|
void |
join(ch.sahits.game.openpatrician.model.IAIPlayer player,
ch.sahits.game.openpatrician.model.city.ICity city) |
boolean |
shouldJoin(ch.sahits.game.openpatrician.model.IAIPlayer player,
ch.sahits.game.openpatrician.model.city.ICity city,
Optional<ch.sahits.game.openpatrician.model.ship.INavigableVessel> vessel)
Base requirements are: there has to be a guild, not yet a member and enough money to join.
|
private static final int ENTRY_FEE_FACTOR
@Autowired private ch.sahits.game.openpatrician.model.city.guild.GuildList guildList
@Autowired private GuildService guildService
public boolean shouldJoin(ch.sahits.game.openpatrician.model.IAIPlayer player,
ch.sahits.game.openpatrician.model.city.ICity city,
Optional<ch.sahits.game.openpatrician.model.ship.INavigableVessel> vessel)
shouldJoin in interface ch.sahits.game.openpatrician.model.player.IAIGuildJoinStrategyplayer - who should decide on joiningcity - where to joinvessel - possible vessel in the cityprotected abstract boolean additionalJoinRequirementsMet(ch.sahits.game.openpatrician.model.IAIPlayer player,
ch.sahits.game.openpatrician.model.city.ICity city,
Optional<ch.sahits.game.openpatrician.model.ship.INavigableVessel> vessel)
public void join(ch.sahits.game.openpatrician.model.IAIPlayer player,
ch.sahits.game.openpatrician.model.city.ICity city)
join in interface ch.sahits.game.openpatrician.model.player.IAIGuildJoinStrategyCopyright © 2011-2018 Sahits GmbH. All Rights Reserved.