public bool ContainsOpposingPiece(Square square, Player currentPlayer) { if (IsSquareEmpty(square) || !square.IsValid()) { return(false); } else { return(GetPiece(square).Player != currentPlayer); } }
public bool IsSquareEmpty(Square testSquare) { if (testSquare.IsValid()) { return(GetPiece(testSquare) == null); } else { return(false); } }
public bool SquareHasEnemy(Square square, Player player) { return(square.IsValid() && GetPiece(square) != null && GetPiece(square).Player != player); }
public bool SquareHasFriendly(Square square, Player player) { return(square.IsValid() && GetPiece(square) != null && GetPiece(square).Player == player); }
public bool SquareIsOccupied(Square square) { return(square.IsValid() && GetPiece(square) != null); }
public bool SquareIsEmpty(Square square) { return(square.IsValid() && GetPiece(square) == null); }