private boolean checkValidMove(ChessPiece piece, int startRow, int startColumn, int endRow, int endColumn){
        if(endRow > (getBoardRows()-1) || endRow < 0 || 
                endColumn > (getBoardColumns()-1) || endColumn < 0 || 
                startRow > (getBoardRows()-1) || startRow < 0 || 
                startColumn > (getBoardColumns()-1) || startRow < 0){ //off board
            return false;
        }
        int player = getSquares()[startRow][startColumn].getPlayer();
        if(getSquares()[endRow][endColumn].getPlayer() == player){ // end spot has piece of same team as moving piece
            return false;
        }

        return piece.isInValidMoves(new Point(endRow, endColumn)); // checks if the point is in the piece's valid moves vector
    }