Code to control if neighbor is alife or dead