Game theory is applied to studying the P2P resource allocation technologies further in this paper. The mechanism of P2P resource pricing, which shows the relation of supply and demand, was presented based on bidding. Subsequently, we designed the utility function of end system and proved the existence and uniqueness of Nash Equilibrium in P2P resource allocation game. At last, we present a P2P resource allocation algorithm (PRANG) based on the resource allocation game model. The results of the experiment and the simulation show that PRANG algorithm can provide references for the quantity of resource that users demand and regularize the users' bids. Consequently, the allocation of the whole P2P resource tends to be more reasonable.