Add mate and stalemate detection