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
-
Field Summary
FieldsFields inherited from class it.polimi.ingsw.server.model.game_logic.PlayableCharacter
characterId, currentCost, effect, initialCost -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidThis method clears the map after the effect of the character is finishedThis method returns the map that maps every professor to the original owner, prior the activation of this characterlightify()This method returns the light version of the PlayableCharacter, containing all the useful information that need to be sent over the networkvoidputProfessor(Color professor, int previousOwnerSchoolBoardId) This method adds a professor to the map that links every professor to its owner prior the activation of the characterMethods inherited from class it.polimi.ingsw.server.model.game_logic.PlayableCharacter
createCharacter, getCharacterId, getCurrentCost, increaseCostMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface it.polimi.ingsw.server.model.game_logic.Playable
addStudent, containsAllStudents, getInitialStudentsNumberOnCharacter, getStudents, isLockAvailable, removeStudent, unLock, useLock
-
Field Details
-
professorToOriginalOwnerMap
-
-
Constructor Details
-
PlayableCharacterProfessor
-
-
Method Details
-
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
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 mappreviousOwnerSchoolBoardId- 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
This method returns the light version of the PlayableCharacter, containing all the useful information that need to be sent over the network- Overrides:
lightifyin classPlayableCharacter- Returns:
- a LightPlayableCharacter containing all the useful information that need to be sent over the network
-