Implement function to replace one player ID with another in a game.