type
Thetype filter takes one argument, a set filter. It returns a number that represents the type of the piece
on that square:
x=type a1 y=type h1 x==y
If its argument set filter does not represent a set that has exactly one element, the type filter does not match the position.
Otherwise, suppose s is the square represented by the argument set filter. The numeric values of the piece types are given by the following table:
| Piece type | Value |
|---|---|
| empty | 0 |
| pawn | 1 |
| knight | 2 |
| bishop | 3 |
| rook | 4 |
| queen | 5 |
| king | 6 |