makesquare

The makesquare filter takes two arguments: a file and a rank enclosed in parentheses:

    makesquare (file rank)

The file argument is a numeric filter whose value represents a file on the chessboard, with the a file being 1, the b file being 2, and so on.

The rank argument is a numeric filter whose value is a rank on the chessboard.

The makesquare filter represents the square whose file and rank are equal to its file and rank arguments respectively. If either of its arguments do not match the position, or if either argumnet is not between 1 and 8, then the makesquare filter does not match the position.

For example

      makesquare (2 4)
represents the square b4. That is,
      b4 == makesquare (2 8)
will match any position.

Technically, makesquare filter is a set filter representing a set that contains exactly one square (unless either the file or the rank is not between 1 and 8, in which case makesquare represents the empty set of squares.)

Notes

Be careful to get the order of arguments correct: the file precedes the rank, even though in English its more customary to say "rank and file".

The makesquare filter is not affected by transforms like flip or rotate90.

Examples

The makequare filter is used in flipverticalecho.cql and horizontallysymmetric.cql.