betweenfilter consists of the single word
betweenfollowed by two set filters enclosed in parentheses:
between(R q) between(A attacks _ a attacks q) between(move from A move to .)
Suppose x and y are two squares on and empty chessboard. We say a square z is between the squares x and y if the center of z lies on a line segment between the centers of x and y, and if z is neither x nor y. We only consider line segments that are on "basic directions": a queen on x must attack y.
For example, there are no squares between
h7 . The square
b2 is the only square between
Suppose s and t are set filters whose corresponding sets of squares in the current position are S and T respectiviely.
between(s t) is the set of squares z such that z is between some square x in S and y in T.
ExamplesThe diagram below
(found from CQL file: 8piecesinline.cql)
The CQL file 8piecesinline.cql matches a game with a position with a line, orthogonal or diagonal, that has 8 pieces, including the position above.