Class StorageBasedEventDecisionStrategy

  • All Implemented Interfaces:
    IAIEventDecisionStrategy

    public class StorageBasedEventDecisionStrategy
    extends java.lang.Object
    implements IAIEventDecisionStrategy
    Event decision strategy based on the stored amount of required goofs.
    Author:
    Andi Hotz, (c) Sahits GmbH, 2016 Created on Dec 18, 2016
    • Field Detail

      • minAmounts

        private java.util.Map<IWare,​java.lang.Integer> minAmounts
    • Constructor Detail

      • StorageBasedEventDecisionStrategy

        public StorageBasedEventDecisionStrategy()
    • 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.
      • enoughStored

        private boolean enoughStored​(IPlayer player,
                                     ICity city)