Class FleetBasedEventDecisionStrategy
- java.lang.Object
-
- ch.sahits.game.openpatrician.engine.player.strategy.FleetBasedEventDecisionStrategy
-
- All Implemented Interfaces:
IAIEventDecisionStrategy
public class FleetBasedEventDecisionStrategy extends java.lang.Object implements IAIEventDecisionStrategy
Strategy for taking event decitions based on the size of the fleet.- Author:
- Andi Hotz, (c) Sahits GmbH, 2016 Created on Dec 18, 2016
-
-
Constructor Summary
Constructors Constructor Description FleetBasedEventDecisionStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
acceptMarriagBrokereOffer(IAIPlayer player)
Decide if the offer of a marriage broker should be accepted.boolean
acceptMarriageOffer(IAIPlayer player)
Decide if a marriage offer should be accepted.private boolean
isFleetLargeEnough(IPlayer player)
boolean
shouldOrderCelebration(IAIPlayer player, ICity city)
Decide if a celebration should be executed.
-
-
-
Method Detail
-
acceptMarriagBrokereOffer
public boolean acceptMarriagBrokereOffer(IAIPlayer player)
Description copied from interface:IAIEventDecisionStrategy
Decide if the offer of a marriage broker should be accepted.- Specified by:
acceptMarriagBrokereOffer
in interfaceIAIEventDecisionStrategy
- Parameters:
player
- who has to make the decision- Returns:
- true if the player accepts the marriage broker offer
-
acceptMarriageOffer
public boolean acceptMarriageOffer(IAIPlayer player)
Description copied from interface:IAIEventDecisionStrategy
Decide if a marriage offer should be accepted.- Specified by:
acceptMarriageOffer
in interfaceIAIEventDecisionStrategy
- Parameters:
player
- who has to make the decision- Returns:
- true if hte player accepts the marriage offer
-
shouldOrderCelebration
public boolean shouldOrderCelebration(IAIPlayer player, ICity city)
Description copied from interface:IAIEventDecisionStrategy
Decide if a celebration should be executed.- Specified by:
shouldOrderCelebration
in interfaceIAIEventDecisionStrategy
- Parameters:
player
- who has to make the decisioncity
- where the celebration takes place- Returns:
- true if the player whished to order a celebration in city.
-
isFleetLargeEnough
private boolean isFleetLargeEnough(IPlayer player)
-
-