shogi/__init__.py
def is_checkmate(self):
        '''Checks if the current position is a checkmate.'''
        if not self.is_check():
            return False

        try:
            next(self.generate_legal_moves().__iter__())
            return False
        except StopIteration:
            return True
def is_checkmate(self):
        '''Checks if the current position is a checkmate.'''
        if not self.is_check():
            return False

        try:
            next(self.generate_legal_moves().__iter__())
            return False
        except StopIteration:
            return True
def is_checkmate ( self ) : if not self . is_check ( ) : return False try : next ( self . generate_legal_moves ( ) . __iter__ ( ) ) return False except StopIteration : return True
Checks if the current position is a checkmate.
Checks if the current position is a checkmate .