Class SideAccess

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

public class SideAccess extends Object implements PieceAccess
Access is granted if PlayerRoster.getMySide() matches
Author:
rkinney
  • Constructor Details

    • SideAccess

      public SideAccess()
  • Method Details

    • getInstance

      public static SideAccess getInstance()
    • 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 id)
      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
    • 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