Class TakeLoanLowMoneyLongestDurationStrategy

  • All Implemented Interfaces:
    ch.sahits.game.openpatrician.model.player.IAITakeLoanStrategy

    public class TakeLoanLowMoneyLongestDurationStrategy
    extends java.lang.Object
    implements ch.sahits.game.openpatrician.model.player.IAITakeLoanStrategy
    Strategy for loan taking. The strategy takes effect when the money is low and taking the loan with the longest duration.
    Author:
    Andi Hotz, (c) Sahits GmbH, 2016 Created on Jun 12, 2016
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean shouldTakeLoan​(ch.sahits.game.openpatrician.model.IAIPlayer player)  
      void takeLoan​(ch.sahits.game.openpatrician.model.IAIPlayer player, ch.sahits.game.openpatrician.model.city.ICity city)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TakeLoanLowMoneyLongestDurationStrategy

        public TakeLoanLowMoneyLongestDurationStrategy()
    • Method Detail

      • shouldTakeLoan

        public boolean shouldTakeLoan​(ch.sahits.game.openpatrician.model.IAIPlayer player)
        Specified by:
        shouldTakeLoan in interface ch.sahits.game.openpatrician.model.player.IAITakeLoanStrategy
      • takeLoan

        public void takeLoan​(ch.sahits.game.openpatrician.model.IAIPlayer player,
                             ch.sahits.game.openpatrician.model.city.ICity city)
        Specified by:
        takeLoan in interface ch.sahits.game.openpatrician.model.player.IAITakeLoanStrategy