예제 #1
0
    def test_is_alive_at_not_dependent_on_location_instance(self):
        coordinates = (0, 0)
        self.location = Location(*coordinates)
        world = World()
        world.set_living_at(self.location)

        location = Location(*coordinates)

        self.assertTrue(world.is_alive_at(location))
예제 #2
0
 def test_a_cell_can_be_added_to_the_world(self):
     world = World()
     world.set_living_at(self.location)
     self.assertTrue(world.is_alive_at(self.location))
예제 #3
0
 def test_a_cell_can_be_set_dead_at_location_if_never_set_living(self):
     world = World()
     world.set_dead_at(self.location)
     self.assertFalse(world.is_alive_at(self.location))
예제 #4
0
 def test_a_new_worlds_cell_is_not_alive(self):
     world = World()
     self.assertFalse(world.is_alive_at(self.location))