@Lazy @Component public class ReputationCalculator extends Object
| Modifier and Type | Field and Description |
|---|---|
private CityProductionAndConsumptionService |
cityProductionAndConsumptionService |
private ch.sahits.game.openpatrician.model.city.PopulationConsume |
consumer |
| Constructor and Description |
|---|
ReputationCalculator() |
| Modifier and Type | Method and Description |
|---|---|
ch.sahits.game.openpatrician.model.personal.ICareer |
calculateCareer(ch.sahits.game.openpatrician.model.city.ICity city,
ch.sahits.game.openpatrician.model.IPlayer player)
Calculate the current career level of the player.
|
(package private) double |
calculateDelta(ch.sahits.game.openpatrician.model.personal.ESocialRank rank) |
int |
calculateWareReputation(ch.sahits.game.openpatrician.model.city.ICity city,
ch.sahits.game.openpatrician.model.IPlayer player)
Check each ware if the player contributes and what amount.
|
(package private) int |
getAvailableLevels(ch.sahits.game.openpatrician.model.personal.ESocialRank rank,
ch.sahits.game.openpatrician.model.IPlayer player) |
(package private) double |
getNegativeReputationFactor(ch.sahits.game.openpatrician.model.IPlayer player,
ch.sahits.game.openpatrician.model.city.ICity city) |
double |
remapReputation(ch.sahits.game.openpatrician.model.city.ICity city,
ch.sahits.game.openpatrician.model.IPlayer player)
Remap the linear reputation stored in a city to value that are used in
ranks.
|
@Autowired private ch.sahits.game.openpatrician.model.city.PopulationConsume consumer
@Autowired private CityProductionAndConsumptionService cityProductionAndConsumptionService
public int calculateWareReputation(ch.sahits.game.openpatrician.model.city.ICity city,
ch.sahits.game.openpatrician.model.IPlayer player)
city - for which the ware based reputation should be checkedplayer - for whom the reputation is calculateddouble getNegativeReputationFactor(ch.sahits.game.openpatrician.model.IPlayer player,
ch.sahits.game.openpatrician.model.city.ICity city)
public double remapReputation(ch.sahits.game.openpatrician.model.city.ICity city,
ch.sahits.game.openpatrician.model.IPlayer player)
city - player - public ch.sahits.game.openpatrician.model.personal.ICareer calculateCareer(ch.sahits.game.openpatrician.model.city.ICity city,
ch.sahits.game.openpatrician.model.IPlayer player)
city - player - double calculateDelta(ch.sahits.game.openpatrician.model.personal.ESocialRank rank)
int getAvailableLevels(ch.sahits.game.openpatrician.model.personal.ESocialRank rank,
ch.sahits.game.openpatrician.model.IPlayer player)
Copyright © 2011-2017 Sahits GmbH. All Rights Reserved.