Class SpecifiedSideAccess

java.lang.Object
VASSAL.counters.SpecifiedSideAccess
All Implemented Interfaces:
PieceAccess

public class SpecifiedSideAccess extends Object implements PieceAccess
Access is granted if PlayerRoster.getMySide() is in a specified list
Author:
rkinney
  • Constructor Details

    • SpecifiedSideAccess

      public SpecifiedSideAccess(List<String> sides)
  • Method Details

    • getCurrentPlayerId

      public String getCurrentPlayerId()
      Description copied from interface: PieceAccess
      Return a String identifying the current player
      Specified by:
      getCurrentPlayerId in interface PieceAccess
    • currentPlayerHasAccess

      public boolean currentPlayerHasAccess(String ownerId)
      Description copied from interface: PieceAccess
      Return true if the current player can access this piece, given that the piece is owned by the player with the given id
      Specified by:
      currentPlayerHasAccess in interface PieceAccess
    • getSides

      public List<String> getSides()
    • currentPlayerCanModify

      public boolean currentPlayerCanModify(String ownerId)
      Description copied from interface: PieceAccess
      Return true if the current player can take (or relinquish) control of this piece
      Specified by:
      currentPlayerCanModify in interface PieceAccess