Code for GOL simulation