We extend the immersed boundary (IB) method to simulate the dynamics of a 2D dry foam by including the topological changes of the bubble network. In the article [Y. Kim, M.-C. Lai, and C. S. Peskin, J. Comput. Phys. 229:5194-5207,2010], we implemented an IB method for the foam problem in the two-dimensional case, and tested it by verifying the von Neumann relation which governs the coarsening of a two-dimensional dry foam. However, the method implemented in that article had an important limitation; we did not allow for the resolution of quadruple or higher order junctions into triple junctions. A total shrinkage of a bubble with more than four edges generates a quadruple or higher order junction. In reality, a higher order junction is unstable and resolves itself into triple junctions. We here extend the methodology previously introduced by allowing topological changes, and we illustrate the significance of such topological changes by comparing the behaviors of foams in which topological changes are allowed to those in which they are not.