Class BaseJoinGuildStrategy
- java.lang.Object
-
- ch.sahits.game.openpatrician.engine.player.strategy.BaseJoinGuildStrategy
-
- All Implemented Interfaces:
ch.sahits.game.openpatrician.model.player.IAIGuildJoinStrategy
- Direct Known Subclasses:
AlwaysJoinGuildMinCashStrategy,HometownJoinGuildMinCashStrategy,NearHometownJoinGuildMinCashStrategy,NearTradingOfficeJoinGuildMinCashStrategy,TradingOfficeJoinGuildMinCashStrategy
public abstract class BaseJoinGuildStrategy extends java.lang.Object implements ch.sahits.game.openpatrician.model.player.IAIGuildJoinStrategyBase implementation for an AI guild join strategy.- Author:
- Andi Hotz, (c) Sahits GmbH, 2017 Created on Oct 04, 2017
-
-
Constructor Summary
Constructors Constructor Description BaseJoinGuildStrategy()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract booleanadditionalJoinRequirementsMet(ch.sahits.game.openpatrician.model.IAIPlayer player, ch.sahits.game.openpatrician.model.city.ICity city, java.util.Optional<ch.sahits.game.openpatrician.model.ship.INavigableVessel> vessel)Additional requirients added by custom strategies.voidjoin(ch.sahits.game.openpatrician.model.IAIPlayer player, ch.sahits.game.openpatrician.model.city.ICity city)booleanshouldJoin(ch.sahits.game.openpatrician.model.IAIPlayer player, ch.sahits.game.openpatrician.model.city.ICity city, java.util.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.
-
-
-
Method Detail
-
shouldJoin
public boolean shouldJoin(ch.sahits.game.openpatrician.model.IAIPlayer player, ch.sahits.game.openpatrician.model.city.ICity city, java.util.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.- Specified by:
shouldJoinin interfacech.sahits.game.openpatrician.model.player.IAIGuildJoinStrategy- Parameters:
player- who should decide on joiningcity- where to joinvessel- possible vessel in the city- Returns:
-
additionalJoinRequirementsMet
protected abstract boolean additionalJoinRequirementsMet(ch.sahits.game.openpatrician.model.IAIPlayer player, ch.sahits.game.openpatrician.model.city.ICity city, java.util.Optional<ch.sahits.game.openpatrician.model.ship.INavigableVessel> vessel)Additional requirients added by custom strategies.
-
join
public void join(ch.sahits.game.openpatrician.model.IAIPlayer player, ch.sahits.game.openpatrician.model.city.ICity city)- Specified by:
joinin interfacech.sahits.game.openpatrician.model.player.IAIGuildJoinStrategy
-
-