Ising Model implemented in C++