Class AITradeChecker


  • public class AITradeChecker
    extends java.lang.Object
    This trade checker verifies that each ship is currently in active tradeing or there is another good reason for it.
    Author:
    Andi Hotz, (c) Sahits GmbH, 2016 Created on Jul 18, 2016
    • Constructor Summary

      Constructors 
      Constructor Description
      AITradeChecker()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean isEngagedInTrading​(ch.sahits.game.openpatrician.model.ship.INavigableVessel vessel)
      Check if the vessel is engaged in trading.
      boolean shouldBeTrading​(ch.sahits.game.openpatrician.model.ship.INavigableVessel vessel)
      Check weather the vessel should be engaged in trading.
      • Methods inherited from class java.lang.Object

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

      • AITradeChecker

        public AITradeChecker()
    • Method Detail

      • isEngagedInTrading

        public boolean isEngagedInTrading​(ch.sahits.game.openpatrician.model.ship.INavigableVessel vessel)
        Check if the vessel is engaged in trading. That means it is either traveling, trading or repairing.
        Parameters:
        vessel - to check if it is engaiged in trading.
        Returns:
        true if the vessel can execute trade steps.
      • shouldBeTrading

        public boolean shouldBeTrading​(ch.sahits.game.openpatrician.model.ship.INavigableVessel vessel)
        Check weather the vessel should be engaged in trading.
        Parameters:
        vessel - not engaged in trading
        Returns:
        true if the vassel should execute a trade step