chesslib/board.py
def _finish_move(self, piece, dest, p1, p2):
        '''
            Set next player turn, count moves, log moves, etc.
        '''
        enemy = self.get_enemy(piece.color)
        if piece.color == 'black':
            self.fullmove_number += 1
        self.halfmove_clock +=1
        self.player_turn = enemy
        abbr = piece.abbriviation
        if abbr == 'P':
            # Pawn has no letter
            abbr = ''
            # Pawn resets halfmove_clock
            self.halfmove_clock = 0
        if dest is None:
            # No capturing
            movetext = abbr + p2.lower()
        else:
            # Capturing
            movetext = abbr + 'x' + p2.lower()
            # Capturing resets halfmove_clock
            self.halfmove_clock = 0

        self.history.append(movetext)

            Set next player turn, count moves, log moves, etc.
        
Set next player turn, count moves, log moves, etc.
Set next player turn count moves log moves etc .
def _finish_move(self, piece, dest, p1, p2):
        enemy = self.get_enemy(piece.color)
        if piece.color == 'black':
            self.fullmove_number += 1
        self.halfmove_clock +=1
        self.player_turn = enemy
        abbr = piece.abbriviation
        if abbr == 'P':
            abbr = ''
            self.halfmove_clock = 0
        if dest is None:
            movetext = abbr + p2.lower()
        else:
            movetext = abbr + 'x' + p2.lower()
             resets halfmove_clock
            self.halfmove_clock = 0
        self.history.append(movetext)
def _finish_move ( self , piece , dest , p1 , p2 ) : enemy = self . get_enemy ( piece . color ) if piece . color == 'black' : self . fullmove_number += 1 self . halfmove_clock += 1 self . player_turn = enemy abbr = piece . abbriviation if abbr == 'P' : abbr = '' self . halfmove_clock = 0 if dest is None : movetext = abbr + p2 . lower ( ) else : movetext = abbr + 'x' + p2 . lower ( ) self . halfmove_clock = 0 self . history . append ( movetext )
Set next player turn, count moves, log moves, etc.
Set next player turn count moves log moves etc .
'''
            Set next player turn, count moves, log moves, etc.
        ''' # Pawn has no letter # Pawn resets halfmove_clock # No capturing # Capturing # Capturing resets halfmove_clock
self
piece
dest
p1
p2