def test_jump_and_grids(self):
        points = [[0, 0, 1, 1], [1, 1, 2, 2], [2, 2, 3, 3], [0, 0, 0, 2],
                  [0, 0, 2, 2], [6, 6, 5, 4]]
        expected_outcomes = [True, True, True, True, True, True]

        test_outcomes = [
            mechanics.is_jump(point[0], point[1], point[2], point[3]) for point
            in points]

        self.assertListEqual(test_outcomes, expected_outcomes)
Beispiel #2
0
    def test_jump_and_grids(self):
        points = [[0, 0, 1, 1], [1, 1, 2, 2], [2, 2, 3, 3], [0, 0, 0, 2],
                  [0, 0, 2, 2], [6, 6, 5, 4]]
        expected_outcomes = [True, True, True, True, True, True]

        test_outcomes = [
            mechanics.is_jump(point[0], point[1], point[2], point[3]) for point
            in points]

        self.assertListEqual(test_outcomes, expected_outcomes)
    def test_jump_special_cases(self):
        points = [[0, 0, 0, 3], [0, 0, 3, 0], [6, 0, 6, 3], [4, 2, 6, 2],
                  [4, 3, 3, 4], [4, 3, 2, 2],
                  [0, 0, 0, 6], [0, 0, 1, 1], [0, 0, 2, 2], [3, 0, 3, 1],
                  [3, 0, 3, 2], [3, 1, 3, 0], [3, 1, 3, 2]]

        expected_outcomes = [False, False, False, True, True, True, True, True,
                             True, False, True, False, False]

        test_outcomes = [
            mechanics.is_jump(point[0], point[1], point[2], point[3]) for point
            in points]

        self.assertListEqual(test_outcomes, expected_outcomes)
Beispiel #4
0
    def test_jump_special_cases(self):
        points = [[0, 0, 0, 3], [0, 0, 3, 0], [6, 0, 6, 3], [4, 2, 6, 2],
                  [4, 3, 3, 4], [4, 3, 2, 2],
                  [0, 0, 0, 6], [0, 0, 1, 1], [0, 0, 2, 2], [3, 0, 3, 1],
                  [3, 0, 3, 2], [3, 1, 3, 0], [3, 1, 3, 2]]

        expected_outcomes = [False, False, False, True, True, True, True, True,
                             True, False, True, False, False]

        test_outcomes = [
            mechanics.is_jump(point[0], point[1], point[2], point[3]) for point
            in points]

        self.assertListEqual(test_outcomes, expected_outcomes)