Commits

Owen Nelson committed e6ece26

Forgot I was iterating over a generator, not a static list. All Tests passing (except for rebirth).

  • Participants
  • Parent commits ef27ad7

Comments (0)

Files changed (2)

             if count < 2 or count > 3:
                 yield (x, y)  # kill the cell if it doesn't have 2 or 3 friendlies
 
-    for pair in _deaths():
+    for pair in list(_deaths()):
         state[pair] = 0
 
     # TODO: rebirth
             [1, 0, 0],
             [1, 0, 0]])
         tick(state)
-        self.assertEqual(state.sum(), 0)
+        self.assertEqual(state.sum(), 1)
 
     def test_any_live_cell_with_two_live_neighbors_lives(self):
         state = np.array([
             [1, 1, 1],
             [0, 0, 0]])
         tick(state)
-        self.assertEqual(state.sum(), 4)
+        self.assertEqual(state.sum(), 3)
 
     def test_any_dead_cell_with_exactly_three_live_neighbors_becomes_alive(self):
         self.skipTest('todo')