

def test_legal_moves_or_stop(self):
    test_legal = ' ######\n                #  # #\n                #   ##\n                #    #\n                ###### '
    universe = CTFUniverse.create(test_legal, 0)
    legal_moves_1_1 = universe.legal_moves_or_stop((1, 1))
    target = {
        east: (2, 1),
        south: (1, 2),
    }
    self.assertEqual(target, legal_moves_1_1)
    legal_moves_2_1 = universe.legal_moves_or_stop((2, 1))
    target = {
        west: (1, 1),
        south: (2, 2),
    }
    self.assertEqual(target, legal_moves_2_1)
    legal_moves_4_1 = universe.legal_moves_or_stop((4, 1))
    target = {
        stop: (4, 1),
    }
    self.assertEqual(target, legal_moves_4_1)
    legal_moves_1_2 = universe.legal_moves_or_stop((1, 2))
    target = {
        north: (1, 1),
        east: (2, 2),
        south: (1, 3),
    }
    self.assertEqual(target, legal_moves_1_2)
    legal_moves_2_2 = universe.legal_moves_or_stop((2, 2))
    target = {
        north: (2, 1),
        east: (3, 2),
        south: (2, 3),
        west: (1, 2),
    }
    self.assertEqual(target, legal_moves_2_2)
    legal_moves_3_2 = universe.legal_moves_or_stop((3, 2))
    target = {
        south: (3, 3),
        west: (2, 2),
    }
    self.assertEqual(target, legal_moves_3_2)
    legal_moves_1_3 = universe.legal_moves_or_stop((1, 3))
    target = {
        north: (1, 2),
        east: (2, 3),
    }
    self.assertEqual(target, legal_moves_1_3)
    legal_moves_2_3 = universe.legal_moves_or_stop((2, 3))
    target = {
        north: (2, 2),
        east: (3, 3),
        west: (1, 3),
    }
    self.assertEqual(target, legal_moves_2_3)
    legal_moves_4_3 = universe.legal_moves_or_stop((4, 3))
    target = {
        west: (3, 3),
    }
    self.assertEqual(target, legal_moves_4_3)

dataset/ETHPy150Open ASPP/pelita/test/test_datamodel.py TestCTFUniverseRules.test_legal_moves_or_stop/original