Class Police

All Implemented Interfaces:
Serializable, Buildable, SideEffect

public class Police extends EffectualFacility
See Also:
  • Constructor Details

    • Police

      public Police(int oneTimeCost, int maintenanceFee, Coordinate coordinate, Dimension dimension, float influenceRadius)
  • Method Details

    • getBuildableType

      public BuildableType getBuildableType()
      Description copied from interface: Buildable
      A type can be:
      Returns:
      the type of the buildable
    • isUnderConstruction

      public boolean isUnderConstruction()
      Description copied from interface: Buildable
      Checks if the buildable is under construction
      Returns:
      boolean
    • effect

      public void effect(Zone zone, GameModel gm)
      Description copied from interface: SideEffect
      Applies special effect of the facility on a given zone. if condition is satisfied.
      Parameters:
      zone - the zone to effect.
    • reverseEffect

      public void reverseEffect(Zone zone, GameModel gm)
      Description copied from interface: SideEffect
      Reverse special effect of the facility on a given zone. if condition is satisfied.
      Parameters:
      zone - the zone to effect.
    • condition

      public boolean condition(Zone zone, GameModel gm)
      Description copied from interface: SideEffect
      Evaluates the condition for the facility to have effect on a given zone
      Specified by:
      condition in interface SideEffect
      Specified by:
      condition in class EffectualFacility
      Parameters:
      zone - the zone to check
      Returns:
      true if condition is satisfied, otherwise, false