Package model
Class Castle
java.lang.Object
model.Entity
model.Building
model.Castle
- All Implemented Interfaces:
Serializable
Implementation of Castle Building type.
- See Also:
-
Field Summary
Fields inherited from class model.Building
canUpgrade, isDestroyed, isUpgraded, upgradeCost
Fields inherited from class model.Entity
animObj, damage, healthPoints, isAlive, isAnimated, maxHealthPoints, owner, position, range, side, size, type, value
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the upgrade cost of the Building instance.void
upgrade()
Upgrades the Building instance, Castles cannot be upgradedMethods inherited from class model.Building
destroy, getImage, isDestroyed, setDestroyed
Methods inherited from class model.Entity
getAnimObj, getDamage, getHealthPoints, getMaxHealthPoints, getOwner, getPosition, getSide, getSize, getType, getValue, invert, isAlive, isAnimated, killUnit, setAlive, setAnimated, setIsAnimated, setOwner, setPosition, setSide, takeDamage
-
Constructor Details
-
Castle
Constructs a new Castle instance.- Parameters:
position
- the castle's position on the Mapside
- the side it belongs to
-
Castle
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 -
getUpgradeCost
public int getUpgradeCost()Description copied from class:Building
Returns the upgrade cost of the Building instance.- Specified by:
getUpgradeCost
in classBuilding
- Returns:
- the upgrade cost of the Building instance
-