sidetomove

The sidetomove filter is a numeric filter that returns the numeric value of the side to move. Use white to represent white to move; use black to represent black to move:
   sidetomove==white

(In fact, the value of white is 1 and the value of black is -1).

The sidetomove filter is often used in the body of the echo filter to check that two positions have the same (or different) sides to move.

If x is some position, then the side to move of x is x:sidetomove. Thus, to check whether the side to move of x is the same as the side to move of the current position, use:

  sidetomove == x:sidetomove

Examples

The sidetomove filter is used in castleecho.cql, chameleon.cql, enpassantecho.cql, flipverticalecho.cql, movedblackpieceecho.cql, underpromotionecho.cql, wcct7.cql.