Class DangerBasedShipUpgradeStrategy

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

    public class DangerBasedShipUpgradeStrategy
    extends java.lang.Object
    implements ch.sahits.game.openpatrician.model.player.IAIShipUpgradeStrategy
    Upgrade strategy for hte ship based on the danger.
    Author:
    Andi Hotz, (c) Sahits GmbH, 2017 Created on Nov 04, 2017
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean shouldUpgrade​(ch.sahits.game.openpatrician.model.ship.IShip ship)  
      void upgrade​(ch.sahits.game.openpatrician.model.ship.IShip ship, 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

      • DangerBasedShipUpgradeStrategy

        public DangerBasedShipUpgradeStrategy()
    • Method Detail

      • shouldUpgrade

        public boolean shouldUpgrade​(ch.sahits.game.openpatrician.model.ship.IShip ship)
        Specified by:
        shouldUpgrade in interface ch.sahits.game.openpatrician.model.player.IAIShipUpgradeStrategy
      • upgrade

        public void upgrade​(ch.sahits.game.openpatrician.model.ship.IShip ship,
                            ch.sahits.game.openpatrician.model.city.ICity city)
        Specified by:
        upgrade in interface ch.sahits.game.openpatrician.model.player.IAIShipUpgradeStrategy