The creation of positron and electron pairs through photon-photon collision, named Breit-Wheeler process, has been well understood in the theories of quantum electrodynamics for nearly 100 years. The photon-photon collision, which is one of the most basic processes of matter generation in the universe, has not been observed yet. The study on photon-photon collision can promote the development of two-photon physics, quantum electrodynamics theories and high energy physics. To observe photon-photon collision in the laboratory, one needs to collimate a huge number of energetic γ-ray photons into a very small spot. Recently, the development of highly collomated source generated by 10 PW laser makes photon-photon collider much more possible than before. In photon-photon collider, the study of numerical simulation plays a critical role since no experiment has achieved such a process. In this paper, a new numerical method is developed to handle the two-photon Breit-Wheeler process. This method is based on the exact two-photon collision dynamic principle, including energy threshold condition, cross-section condition, Lorentz transformation, etc. In the method, the photons are divided into quantitative photon blocks based on the spatial coordinates. Firstly, one needs to find the collision blocks according to the spatial motion law. Secondly, the ergodic method is used to look up the photons that satisfy the energy threshold condition and the cross-section condition from the blocks. Then, one can calculate the electron yield of the photon collision, and the kinetic parameters of the positrons and electrons. This method rigorously follows the physical principle so it has high precision. On the other hand, this method determines the collision of the block in advance, which can reduce the computational requirement a lot. A series of tests is carried out to confirm the accuracy and feasibility of this numerical method by calculating the collision between mono-energetic photon beams. In the tests, the collision angle is assumed to 180° and 60° separately, the results of pair momentum distribution are discussed. We also simulate the collision of the γ-ray beams generated through the interaction between ultra-intense laser and narrow tube targets. In the simulations, the collision angle is changed from 170° to 30° to see its effect on pair production. It is found that the yield of electron-positron pairs decreases with collision angle increasing, which has also been reported in previous work. Therefore, this numerical method can be efficiently used for modeling photon-photon collider, and provide theoretical reference and suggestion to the future experimental design of γ-ray collision.