Class Reputation
- java.lang.Object
-
- ch.sahits.game.openpatrician.model.personal.impl.Reputation
-
- All Implemented Interfaces:
IReputation
public class Reputation extends java.lang.Object implements IReputation
Implementation of the reputation.- Author:
- Andi Hotz, (c) Sahits GmbH, 2012 Created on Jul 23, 2012
-
-
Constructor Summary
Constructors Constructor Description Reputation(ICity city, IPlayer player)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddWareReputation(int wareReputation)Update the reputation with the reputation change by supplying wares.intgetPopularity()Retrieve the popularity of the player in the cityintgetReputationDifference()Retrieve the change in reputation within the last week.voidupdate(int amount)Update the reputation by the amount.
-
-
-
Method Detail
-
getReputationDifference
public int getReputationDifference()
Description copied from interface:IReputationRetrieve the change in reputation within the last week. Single digit values indicate a small change, values larger than 25 indicate a very large change.- Specified by:
getReputationDifferencein interfaceIReputation- Returns:
- reputation change in the last week
-
addWareReputation
public void addWareReputation(int wareReputation)
Description copied from interface:IReputationUpdate the reputation with the reputation change by supplying wares.- Specified by:
addWareReputationin interfaceIReputation- Parameters:
wareReputation- reputation bonus by ware delivery.
-
getPopularity
public int getPopularity()
Description copied from interface:IReputationRetrieve the popularity of the player in the city- Specified by:
getPopularityin interfaceIReputation- Returns:
- current popularity in the city this instance is assigned to
-
update
public void update(int amount)
Description copied from interface:IReputationUpdate the reputation by the amount.- Specified by:
updatein interfaceIReputation- Parameters:
amount- new reputation amount.
-
-