Class 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
    • 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 city
      int getReputationDifference()
      Retrieve the change in reputation within the last week.
      void update​(int amount)
      Update the reputation by the amount.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Reputation

        public Reputation​(ICity city,
                          IPlayer player)
    • 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 interface IReputation
        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 interface IReputation
        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 interface IReputation
        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 interface IReputation
        Parameters:
        amount - new reputation amount.