OP()
Static method that returns the quadrille obtained after applying the given logical operator between the two given quadrilles. This method is useful to implement the other high-level logical operators. For instance the AND operator is implemented as follows:
1linkstatic AND(quadrille1, quadrille2, row=0, col=0) {
2link return this.OP(quadrille1, quadrille2,
3link (q1, q2) => {
4link if (q1 && q2) {
5link return q1;
6link }
7link },
8link row, col);
9link}
Quadrille.OP(quadrille1, quadrille2, operator, [row], [col])
quadrille1 | Quadrille: first quadrille |
quadrille2 | Quadrille: second quadrille |
operator | Function: the function object defining the logical operator |
row | Number: quadrille2 to quadrille1 vertical displacement default is 0. Negative values are allowed |
col | Number: quadrille2 to quadrille1 horizontal displacement default is 0. Negative values are allowed |