Class PlayableCharacterProfessor

java.lang.Object
it.polimi.ingsw.server.model.game_logic.PlayableCharacter
it.polimi.ingsw.server.model.game_logic.PlayableCharacterProfessor
All Implemented Interfaces:
Playable

public class PlayableCharacterProfessor extends PlayableCharacter
  • Field Details

    • professorToOriginalOwnerMap

      private final Map<Color,Integer> professorToOriginalOwnerMap
  • Constructor Details

    • PlayableCharacterProfessor

      protected PlayableCharacterProfessor(Character character)
  • Method Details

    • getProfessorToOriginalOwnerMap

      public Map<Color,Integer> getProfessorToOriginalOwnerMap()
      This method returns the map that maps every professor to the original owner, prior the activation of this character
      Returns:
      the map that maps every professor to the original owner, prior the activation of this character
    • putProfessor

      public void putProfessor(Color professor, int previousOwnerSchoolBoardId)
      This method adds a professor to the map that links every professor to its owner prior the activation of the character
      Parameters:
      professor - is the color representing the professor that has to be added to the map
      previousOwnerSchoolBoardId - is the int representing the ID of the schoolBoard of the original owner
    • clearProfessorsToOriginalOwnerMap

      public void clearProfessorsToOriginalOwnerMap()
      This method clears the map after the effect of the character is finished
    • lightify

      public LightPlayableCharacter lightify()
      This method returns the light version of the PlayableCharacter, containing all the useful information that need to be sent over the network
      Overrides:
      lightify in class PlayableCharacter
      Returns:
      a LightPlayableCharacter containing all the useful information that need to be sent over the network