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
-
-
Field Summary
Fields Modifier and Type Field Description private ICity
city
private IPlayer
player
private int
reputationCurrentWeek
private int
reputationLastWeek
-
Constructor Summary
Constructors Constructor Description Reputation(ICity city, IPlayer player)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addWareReputation(int wareReputation)
Update the reputation with the reputation change by supplying wares.int
getPopularity()
Retrieve the popularity of the player in the cityint
getReputationDifference()
Retrieve the change in reputation within the last week.void
update(int amount)
Update the reputation by the amount.
-
-
-
Method Detail
-
getReputationDifference
public int getReputationDifference()
Description copied from interface:IReputation
Retrieve 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:
getReputationDifference
in interfaceIReputation
- Returns:
- reputation change in the last week
-
addWareReputation
public void addWareReputation(int wareReputation)
Description copied from interface:IReputation
Update the reputation with the reputation change by supplying wares.- Specified by:
addWareReputation
in interfaceIReputation
- Parameters:
wareReputation
- reputation bonus by ware delivery.
-
getPopularity
public int getPopularity()
Description copied from interface:IReputation
Retrieve the popularity of the player in the city- Specified by:
getPopularity
in interfaceIReputation
- Returns:
- current popularity in the city this instance is assigned to
-
update
public void update(int amount)
Description copied from interface:IReputation
Update the reputation by the amount.- Specified by:
update
in interfaceIReputation
- Parameters:
amount
- new reputation amount.
-
-