Monte Carlo method doesn't work

I need more correct random-update method