Revert "Remove rank condition"

This reverts commit 4b1d6fe7d26101f4ebca94f7001575fc050c4f83.
Depth 2 threshold for trapped rook