Class OpponentsOrder

  • All Implemented Interfaces:
    java.lang.Runnable

    public class OpponentsOrder
    extends ch.sahits.game.openpatrician.model.event.TimedTask
    Order of the opponent to attack the original client. The offer is postponed 10 days and will be canceled once the opponents ship is attacked. This task adds itself the the timed event list.
    Author:
    Andi Hotz, (c) Sahits GmbH, 2013 Created on Feb 24, 2013
    • Constructor Summary

      Constructors 
      Constructor Description
      OpponentsOrder​(ch.sahits.game.openpatrician.model.IPlayer opponent, ch.sahits.game.openpatrician.model.IPlayer client, ch.sahits.game.openpatrician.model.IPlayer player, int premium)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void handleShipAttack​(ch.sahits.game.openpatrician.event.data.ShipAttackEvent event)
      Handling ships attacks.
      void run()  
      java.lang.String toString()  
      • Methods inherited from class ch.sahits.game.openpatrician.model.event.TimedTask

        canEqual, equals, getExecutionTime, getUuid, hashCode, setExecutionTime
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • OpponentsOrder

        public OpponentsOrder​(ch.sahits.game.openpatrician.model.IPlayer opponent,
                              ch.sahits.game.openpatrician.model.IPlayer client,
                              ch.sahits.game.openpatrician.model.IPlayer player,
                              int premium)
    • Method Detail

      • run

        public void run()
      • handleShipAttack

        public void handleShipAttack​(ch.sahits.game.openpatrician.event.data.ShipAttackEvent event)
        Handling ships attacks.
        Parameters:
        event - of a ship attack
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object