def test_find_attackable_position(self): # arrange test_units = {(0, 0): ("G", 200, 3), (1, 0): ("E", 200, 3)} # act actual = find_attackable_position(test_units, (0, 0)) # assert self.assertEqual(actual, (1, 0))
def test_find_attackable_position_must_be_different_unit_type(self): # arrange test_units = {(0, 0): ("G", 200, 3), (1, 0): ("G", 200, 3)} # act actual = find_attackable_position(test_units, (0, 0)) # assert self.assertEqual(actual, None)
def test_find_attackable_position_none(self): # arrange test_map = ("G.G\n" ".E.\n" "G.G\n") (_walls, test_units) = parse_map(test_map) # act actual = find_attackable_position(test_units, (1, 1)) # assert self.assertEqual(actual, None)