Interface IBuilding
-
- All Known Subinterfaces:
IBarn,ICityHall,ICityWall,IGabledHouse,IHalfTimberedHouse,IHospital,IMarketplace,IMerchantHouse,ITownHouse,ITradingOffice,IWarehouse,IWell,IWorkShop
- All Known Implementing Classes:
TradingOffice
public interface IBuildingBasic definition of a building.- Author:
- Andi Hotz, (c) Sahits GmbH, 2011 Created on Dec 17, 2011
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voiddestroy()Execute when the building is destroyed.ICitygetCity()Retreive the location of the building.IPlayergetOwner()Retrieve the owner of the trading officeintgetPropertyTax()Retrieve the amount of property taxes per weekintgetValue()Retrieve the value of the buildingvoidsetOwner(IPlayer newOwner)Some buildings may be sold to other players.
-
-
-
Method Detail
-
getOwner
IPlayer getOwner()
Retrieve the owner of the trading office- Returns:
- owner of the building
-
setOwner
void setOwner(IPlayer newOwner)
Some buildings may be sold to other players.- Parameters:
newOwner- owner of the building
-
getPropertyTax
int getPropertyTax()
Retrieve the amount of property taxes per week- Returns:
- property tax of the building per week.
-
getValue
int getValue()
Retrieve the value of the building- Returns:
- value of the building
-
destroy
void destroy()
Execute when the building is destroyed.
-
getCity
ICity getCity()
Retreive the location of the building.- Returns:
- city in which the building stands.
-
-