Exemple #1
0
 def test_clean(self):
     grid = Grid('... .#. ...'.split())
     assert grid.is_infected((1, 1))
     grid.clean((1, 1))
     assert not grid.is_infected((1, 1))
Exemple #2
0
 def test_infect(self):
     grid = Grid('... .#. ...'.split())
     assert not grid.is_infected((2, 2))
     grid.infect((2, 2))
     assert grid.is_infected((2, 2))