Interface InfluenceCalculator

All Known Implementing Classes:
BonusInfluence, CommonInfluence, ExcludeColorInfluence, NoTowersInfluence

public interface InfluenceCalculator
The influence calculation during the game is operated by a calculator entity. This interface encloses a state pattern, which will be implemented by concrete classes.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    calculate(Player player, IslandGroup island, Set<Color> ownedProfessors)
    The method evaluates the influence of a Player on a certain island.
  • Method Details

    • calculate

      int calculate(Player player, IslandGroup island, Set<Color> ownedProfessors) throws InvalidArgumentException
      The method evaluates the influence of a Player on a certain island.
      Parameters:
      player - the main target of the calculation
      island - the game location used for the calculation
      ownedProfessors - the Color(s) of the professors which the Player owns
      Returns:
      the influence value for the given Player on the specified island
      Throws:
      InvalidArgumentException - if one or more parameters are illegal