public void match(Pipe pipe_) {
        
        int idx = pipes.indexOf (pipe_);
        //  If pipe is already matching do nothing.
        if (idx < matching)
            return;

        //  If the pipe isn't eligible, ignore it.
        if (idx >= eligible)
            return;

        //  Mark the pipe as matching.
        Utils.swap( pipes, idx, matching);
        matching++;

    }