Class 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 Detail

      • FleetBasedEventDecisionStrategy

        public FleetBasedEventDecisionStrategy()
    • Method Detail

      • shouldOrderCelebration

        public boolean shouldOrderCelebration​(IAIPlayer player,
                                              ICity city)
        Description copied from interface: IAIEventDecisionStrategy
        Decide if a celebration should be executed.
        Specified by:
        shouldOrderCelebration in interface IAIEventDecisionStrategy
        Parameters:
        player - who has to make the decision
        city - where the celebration takes place
        Returns:
        true if the player whished to order a celebration in city.
      • isFleetLargeEnough

        private boolean isFleetLargeEnough​(IPlayer player)