def promote_pawn(self): last_move = self.move_list[-1] if last_move.is_pawn_promotion(): self.set_piece(last_move.square_to, Queen(self.current_player))
def promotePawn(self, square): player = self.current_player new_piece = Queen(player) self.set_piece(square, new_piece)