Package VASSAL.counters
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
-
Nested Class Summary
Nested classes/interfaces inherited from interface VASSAL.counters.PieceAccess
PieceAccess.GlobalAccess
-
Constructor Summary
Constructors Constructor Description PlayerAccess()
-
Method Summary
Modifier and Type Method Description boolean
currentPlayerCanModify(String ownerId)
Return true if the current player can take (or relinquish) control of this pieceboolean
currentPlayerHasAccess(String id)
Return true if the current player can access this piece, given that the piece is owned by the player with the given idString
getCurrentPlayerId()
Return a String identifying the current playerstatic PlayerAccess
getInstance()
-
Constructor Details
-
PlayerAccess
public PlayerAccess()
-
-
Method Details
-
getInstance
-
getCurrentPlayerId
Description copied from interface:PieceAccess
Return a String identifying the current player- Specified by:
getCurrentPlayerId
in interfacePieceAccess
-
currentPlayerHasAccess
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 interfacePieceAccess
-
currentPlayerCanModify
Description copied from interface:PieceAccess
Return true if the current player can take (or relinquish) control of this piece- Specified by:
currentPlayerCanModify
in interfacePieceAccess
-