Package model

Class Castle

All Implemented Interfaces:
Serializable

public class Castle extends Building
Implementation of Castle Building type.
See Also:
  • Constructor Details

    • Castle

      public Castle(Point position, Sides side)
      Constructs a new Castle instance.
      Parameters:
      position - the castle's position on the Map
      side - the side it belongs to
    • Castle

      public Castle(Point position)
      Constructs a new Castle instance.
      Parameters:
      position - the castle's position on the Map
  • Method Details

    • upgrade

      public void upgrade()
      Upgrades the Building instance, Castles cannot be upgraded
      Specified by:
      upgrade in class Building
    • getUpgradeCost

      public int getUpgradeCost()
      Description copied from class: Building
      Returns the upgrade cost of the Building instance.
      Specified by:
      getUpgradeCost in class Building
      Returns:
      the upgrade cost of the Building instance