Interface IAIEventHandler

  • All Known Implementing Classes:
    AIPlayerEngine

    public interface IAIEventHandler
    Handle the events triggered by the EventEngine and targeted at an AI player
    Author:
    Andi Hotz, (c) Sahits GmbH, 2016 Created on Dec 14, 2016
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void handleDonationRequest​(ch.sahits.game.openpatrician.model.IAIPlayer player, ch.sahits.game.openpatrician.clientserverinterface.model.event.DonationRequestState state)
      Handle a donation request.
      void handleMarriageEvent​(ch.sahits.game.openpatrician.model.IAIPlayer player, ch.sahits.game.openpatrician.clientserverinterface.model.event.MarriageBrokerAnnouncementState state)
      Handle the offer of a marriage broker.
      void handleMarriageWareDelivery​(ch.sahits.game.openpatrician.model.IAIPlayer player, ch.sahits.game.openpatrician.clientserverinterface.model.event.MarriageFeastRequestState state)
      Handle the request to deliver marriage wares.
      void initializeNewShip​(ch.sahits.game.openpatrician.model.ship.IShip ship, ch.sahits.game.openpatrician.model.IAIPlayer player)
      Method to handle the initializing of a trade strategy for a new ship.
    • Method Detail

      • handleMarriageEvent

        void handleMarriageEvent​(ch.sahits.game.openpatrician.model.IAIPlayer player,
                                 ch.sahits.game.openpatrician.clientserverinterface.model.event.MarriageBrokerAnnouncementState state)
        Handle the offer of a marriage broker.
        Parameters:
        state - of the marriage broker
      • handleMarriageWareDelivery

        void handleMarriageWareDelivery​(ch.sahits.game.openpatrician.model.IAIPlayer player,
                                        ch.sahits.game.openpatrician.clientserverinterface.model.event.MarriageFeastRequestState state)
        Handle the request to deliver marriage wares.
        Parameters:
        player - that is requested to deliver the wares
        state - request details
      • handleDonationRequest

        void handleDonationRequest​(ch.sahits.game.openpatrician.model.IAIPlayer player,
                                   ch.sahits.game.openpatrician.clientserverinterface.model.event.DonationRequestState state)
        Handle a donation request.
        Parameters:
        player - that is requested to deliver the wares
        state - request details
      • initializeNewShip

        void initializeNewShip​(ch.sahits.game.openpatrician.model.ship.IShip ship,
                               ch.sahits.game.openpatrician.model.IAIPlayer player)
        Method to handle the initializing of a trade strategy for a new ship.
        Parameters:
        ship - to be initialized
        player - for whom the ship is to be initialized