Quick and dirty implementation of ising model in 2D