A class of stochastic games with infinitely many interacting agents related to Glauber dynamics on random graphs