Exemplo n.º 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))
Exemplo n.º 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))