Class PlayableCharacterLock

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

public class PlayableCharacterLock extends PlayableCharacter
  • Field Details

    • availableLocks

      private int availableLocks
  • Constructor Details

    • PlayableCharacterLock

      protected PlayableCharacterLock(Character character)
  • Method Details

    • isLockAvailable

      public boolean isLockAvailable()
      This method returns true if there are locks available, false otherwise
      Returns:
      true if there are locks available, false otherwise
    • unLock

      public void unLock()
      This method increases the lock count
    • useLock

      public void useLock()
      This method decreases the lock count
    • lightify

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