Class AIPlayerEngineState


  • public class AIPlayerEngineState
    extends java.lang.Object
    State of the AIPlayerEngine that holds the serializable part for the engine. Created by andi on 01.04.17.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void activateVesselForTrade​(ch.sahits.game.openpatrician.model.ship.INavigableVessel vessel)
      Activate a vessel for engaging in a trade step.
      void deactivateVesselForTrade​(ch.sahits.game.openpatrician.model.ship.INavigableVessel vessel)
      Deactive a vessel for trading.
      boolean isActive​(ch.sahits.game.openpatrician.model.ship.INavigableVessel vessel)
      Check if a vessel is currently the active vessel doing trading.
      • Methods inherited from class java.lang.Object

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

      • AIPlayerEngineState

        public AIPlayerEngineState()
    • Method Detail

      • activateVesselForTrade

        public void activateVesselForTrade​(ch.sahits.game.openpatrician.model.ship.INavigableVessel vessel)
        Activate a vessel for engaging in a trade step. Before a vessel is activated, no other vessel may be active.
        Parameters:
        vessel - to be activated.
      • deactivateVesselForTrade

        public void deactivateVesselForTrade​(ch.sahits.game.openpatrician.model.ship.INavigableVessel vessel)
        Deactive a vessel for trading. The vessel must currently be active
        Parameters:
        vessel - to be deactivated.
      • isActive

        public boolean isActive​(ch.sahits.game.openpatrician.model.ship.INavigableVessel vessel)
        Check if a vessel is currently the active vessel doing trading.
        Parameters:
        vessel - to be checked.
        Returns:
        true if the vessel is the one actively trading.