shogi/__init__.py
def is_fourfold_repetition(self):
        '''
        a game is ended if a position occurs for the fourth time
        on consecutive alternating moves.
        '''
        zobrist_hash = self.zobrist_hash()

        # A minimum amount of moves must have been played and the position
        # in question must have appeared at least four times.
        if self.transpositions[zobrist_hash] < 4:
            return False

        return True
def is_fourfold_repetition(self):
        '''
        a game is ended if a position occurs for the fourth time
        on consecutive alternating moves.
        '''
        zobrist_hash = self.zobrist_hash()

        # A minimum amount of moves must have been played and the position
        # in question must have appeared at least four times.
        if self.transpositions[zobrist_hash] < 4:
            return False

        return True
def is_fourfold_repetition ( self ) : zobrist_hash = self . zobrist_hash ( ) # A minimum amount of moves must have been played and the position # in question must have appeared at least four times. if self . transpositions [ zobrist_hash ] < 4 : return False return True
a game is ended if a position occurs for the fourth time
        on consecutive alternating moves.
a game is ended if a position occurs for the fourth time on consecutive alternating moves .