module/src/matrix.js
/**
     * Determine if the current matrix intersects any of the provided matrices
     * where intersection is considered to be when one or more matrix values are
     * equal to 1 at the same row and column position.
     * @param  {[Matrix]} matrices - the sequence of matrix to check intersection with
     * @return {boolean}
     */
Determine if the current matrix intersects any of the provided matrices
where intersection is considered to be when one or more matrix values are
equal to 1 at the same row and column position.
@param  {[Matrix]} matrices - the sequence of matrix to check intersection with
@return {boolean}
Determine if the current matrix intersects any of the provided matrices where intersection is considered to be when one or more matrix values are equal to 1 at the same row and column position . @param { [ Matrix ] } matrices - the sequence of matrix to check intersection with @return { boolean }
intersects(matrices) {
        for (let row = 0; row < this.rows; row++) {
            for (let column = 0; column < this.columns; column++) {
                const value = this.get(row, column);
                if (value === 1) {
                    for (let otherMatrix of matrices) {
                        const otherValue = otherMatrix.get(row, column);
                        if (otherValue === 1) {
                            return true;
                        }
                    }
                }
            }
        }
        return false;
    }
intersects ( matrices ) { for ( let row = 0 ; row < this . rows ; row ++ ) { for ( let column = 0 ; column < this . columns ; column ++ ) { const value = this . get ( row , column ) ; if ( value === 1 ) { for ( let otherMatrix of matrices ) { const otherValue = otherMatrix . get ( row , column ) ; if ( otherValue === 1 ) { return true ; } } } } } return false ; }
Determine if the current matrix intersects any of the provided matrices
 where intersection is considered to be when one or more matrix values are
 equal to 1 at the same row and column position.
Determine if the current matrix intersects any of the provided matrices where intersection is considered to be when one or more matrix values are equal to 1 at the same row and column position .
// todo: potentially we can run faster here by merging the other matrices into one