Class Steward
- java.lang.Object
-
- ch.sahits.game.openpatrician.model.building.impl.Steward
-
-
Field Summary
Fields Modifier and Type Field Description private int
expertiseLevel
private int
salary
private int
totalProfit
-
Constructor Summary
Constructors Constructor Description Steward()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getTotalProfit()
Retrieve the amount of profit the steward made.void
updateProfit(int profit)
Add the profit the total profit.void
upgradeToNextLevel()
Increase the experiance level by one.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface ch.sahits.game.openpatrician.model.building.ISteward
getExpertiseLevel, getSalary
-
-
-
-
Method Detail
-
getTotalProfit
public int getTotalProfit()
Description copied from interface:ISteward
Retrieve the amount of profit the steward made. The profit defines when the next level is reached.- Specified by:
getTotalProfit
in interfaceISteward
- Returns:
- total profit.
-
updateProfit
public void updateProfit(int profit)
Description copied from interface:ISteward
Add the profit the total profit.- Specified by:
updateProfit
in interfaceISteward
- Parameters:
profit
- additional profit to the total (may be negative)
-
upgradeToNextLevel
public void upgradeToNextLevel()
Description copied from interface:ISteward
Increase the experiance level by one. The highest level i 5.- Specified by:
upgradeToNextLevel
in interfaceISteward
-
-