pinstalemate.cql

// Download pinstalemate.cql
// PGN output when run on sample.pgn

/*************
Find stalemates where at least two pieces are pinned.
Sort by the number of pins in descending order, and the total power of the
pieces in ascending order
************/

cql(input heijden.pgn)
flipcolor{
 btm
 stalemate
 sort "number of pins"
     pin through a to k
       >1
 sort min "material" power .
 }