Implemented a stalemate counter