def test_ressurrect_3(self): state = from_string(2, 3, ".*.*.*") next_state = next_generation(state) self.assertTrue(next_state.is_alive(1, 1))
def test_dying_alone(self): state = from_string(1, 3, ".*.") next_state = next_generation(state) self.assertFalse(next_state.is_alive(0, 1))
def test_not_ressurrect_2(self): state = from_string(2, 3, "...*.*") next_state = next_generation(state) self.assertFalse(next_state.is_alive(1, 1))
def test_dying_5(self): state = from_string(2, 3, "******") next_state = next_generation(state) self.assertFalse(next_state.is_alive(1, 1))
def test_not_dying_3_variation(self): state = from_string(2, 3, ".*.***") next_state = next_generation(state) self.assertTrue(next_state.is_alive(1, 1))
def test_not_dying_3(self): state = from_string(2, 3, "***.*.") next_state = next_generation(state) self.assertTrue(next_state.is_alive(0, 1))
def next_step(self): if not self.pause: self.state = next_generation(self.state) self.draw_state() self.frame.after(self.DELAY, self.next_step)