Add checkmate detection.