Class EventService


  • @Service
    public class EventService
    extends java.lang.Object
    Event related utility methods. Created by andi on 25.03.17.
    • Constructor Summary

      Constructors 
      Constructor Description
      EventService()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Optional<ch.sahits.game.openpatrician.model.personal.ISpouseData> calculateSpouseDeath​(ch.sahits.game.openpatrician.model.IPlayer player, ch.sahits.game.openpatrician.model.city.ICity city)  
      void postToHumanPlayer​(ch.sahits.game.openpatrician.model.ui.IDialogState state, ch.sahits.game.openpatrician.model.IPlayer player, java.lang.String messageKey, java.lang.Object... messageParams)
      Post a message that will end up in the message queue.
      • Methods inherited from class java.lang.Object

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

      • EventService

        public EventService()
    • Method Detail

      • calculateSpouseDeath

        public java.util.Optional<ch.sahits.game.openpatrician.model.personal.ISpouseData> calculateSpouseDeath​(ch.sahits.game.openpatrician.model.IPlayer player,
                                                                                                                ch.sahits.game.openpatrician.model.city.ICity city)
      • postToHumanPlayer

        public void postToHumanPlayer​(ch.sahits.game.openpatrician.model.ui.IDialogState state,
                                      ch.sahits.game.openpatrician.model.IPlayer player,
                                      java.lang.String messageKey,
                                      java.lang.Object... messageParams)
        Post a message that will end up in the message queue.
        Parameters:
        state - dialog state for the display message
        player - player to whom the message is posted
        messageKey - text key of the display state message
        messageParams - message parameters for the message