Interface PieceAccess

All Known Implementing Classes:
PlayerAccess, SideAccess, SpecifiedSideAccess

public interface PieceAccess
Defines ability of a player to access a GamePiece
Author:
rkinney
  • Nested Class Summary

    Nested Classes
    Modifier and Type Interface Description
    static class  PieceAccess.GlobalAccess
    Global utility class to temporarily restrict access to all piece
  • Method Summary

    Modifier and Type Method Description
    boolean currentPlayerCanModify​(String ownerId)
    Return true if the current player can take (or relinquish) control of this piece
    boolean currentPlayerHasAccess​(String ownerId)
    Return true if the current player can access this piece, given that the piece is owned by the player with the given id
    String getCurrentPlayerId()
    Return a String identifying the current player
  • Method Details

    • getCurrentPlayerId

      String getCurrentPlayerId()
      Return a String identifying the current player
    • currentPlayerHasAccess

      boolean currentPlayerHasAccess​(String ownerId)
      Return true if the current player can access this piece, given that the piece is owned by the player with the given id
    • currentPlayerCanModify

      boolean currentPlayerCanModify​(String ownerId)
      Return true if the current player can take (or relinquish) control of this piece