public class Reputation extends Object implements IReputation
| Modifier and Type | Field and Description |
|---|---|
private ICity |
city |
private com.google.common.eventbus.AsyncEventBus |
clientServerEventBus |
private IPlayer |
player |
private ReputationCalculator |
repCalc |
private int |
reputationCurrentWeek |
private int |
reputationLastWeek |
private PeriodicalTimeUpdateFactory |
timeUpdateFactory |
| Constructor and Description |
|---|
Reputation(ICity city,
IPlayer player) |
| Modifier and Type | Method and Description |
|---|---|
int |
getPopularity()
Retrieve the popularity of the player in the city
|
int |
getReputationDifference()
Retrieve the change in reputation within the last week.
|
void |
handleLoanGiving(LoanGivingEvent event)
When a loan is given this improves the reputation.
|
void |
handleRemitLoan(RemitLoanEvent event) |
void |
handleWeeklyUpdate(PeriodicalTimeWeekUpdate event)
Handling the daily update events.
|
private void |
init() |
private int reputationLastWeek
private int reputationCurrentWeek
private final ICity city
private final IPlayer player
@Autowired private ReputationCalculator repCalc
@Autowired private PeriodicalTimeUpdateFactory timeUpdateFactory
@Autowired @Qualifier(value="serverClientEventBus") private com.google.common.eventbus.AsyncEventBus clientServerEventBus
private void init()
public int getReputationDifference()
IReputationgetReputationDifference in interface IReputationpublic void handleWeeklyUpdate(PeriodicalTimeWeekUpdate event)
event - public int getPopularity()
IReputationgetPopularity in interface IReputationpublic void handleLoanGiving(LoanGivingEvent event)
event - public void handleRemitLoan(RemitLoanEvent event)
Copyright © 2011-2015 Sahits GmbH. All Rights Reserved.