示例#1
0
 def test_check_path_with_impassible_square(self):
     from warlord.path import check_path, ImpassibleTileError
     tile = Mock()
     self.unit.is_passible.return_value = False
     self.assertTrue(not check_path(self.unit, ('U',), tile))
示例#2
0
 def test_check_path_left(self):
     from warlord.path import check_path
     self.assertTrue(check_path(self.unit, ('L',), self.tile))
示例#3
0
 def test_check_multi_direction_path(self):
     from warlord.path import check_path
     self.assertTrue(check_path(self.unit,
         ('U', 'U', 'L', 'L', 'D', 'R', 'D', 'L', 'U'), self.tile))