colortype
Thecolortype filter is deprecated. Use piecename instead.
The colortype filter takes one argument, a set filter. If its argument represents a set with exactly one square, then the value of the colortype filter is
a number that represents the color and type of the piece
on that square:
x=colortype a1 y=colortype h1 x==y
If the argument set filter does not represent a set that has exactly one element, the colortype filter does not match the position.
Otherwise, suppose s is the square represented by the argument set filter. Then:
- If s is not occupied by a piece,
colortype sis 0. - If s is occupied by a white piece, then
colortype s == type s
- If s is occupied by a black piece, then
colortype s == - type s