def test_multi_direction_path(self): from warlord.path import path path(self.unit, ('U', 'U', 'L', 'L', 'D', 'R', 'D', 'L', 'U')) new_tile = self.tile.up.up.left.left.down.right.down.left.up self.assertEquals(self.unit.tile, new_tile) self.assertEqual(new_tile.unit, self.unit)
def test_path_right(self): from warlord.path import path path(self.unit, ('R',)) self.assertEqual(self.unit.tile, self.tile.right) self.assertEqual(self.tile.right.unit, self.unit)
def test_path_down(self): from warlord.path import path path(self.unit, ('D',)) self.assertEqual(self.unit.tile, self.tile.down) self.assertEqual(self.tile.down.unit, self.unit)
def test_path_left(self): from warlord.path import path path(self.unit, ('L',)) self.assertEqual(self.unit.tile, self.tile.left) self.assertEqual(self.tile.left.unit, self.unit)
def test_path_up(self): from warlord.path import path path(self.unit, ('U',)) self.assertEqual(self.unit.tile, self.tile.up) self.assertEqual(self.tile.up.unit, self.unit)