Class PlayerAccess

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

public class PlayerAccess extends Object implements PieceAccess
Access is granted if GameModule.getUserId() matches
Author:
rkinney
  • Constructor Details

    • PlayerAccess

      public PlayerAccess()
  • Method Details

    • getInstance

      public static PlayerAccess 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