示例#1
0
    def test_transform_index_flipud(self):
        size = 9
        action = (0, 0)

        expected_action = move_to_index((8, 0), size)
        actual_action = transform_index(move_to_index(action, size),
                                        THTransformation.flipud, size)

        assert expected_action == actual_action
示例#2
0
    def test_transform_index_rotate_270(self):
        size = 9
        action = (0, 0)

        expected_action = move_to_index((0, 8), size)
        actual_action = transform_index(move_to_index(action, size),
                                        THTransformation.rotate_270, size)

        assert expected_action == actual_action
示例#3
0
    def test_transform_index_diagonal_right_down(self):
        size = 9
        action = (0, 0)

        expected_action = move_to_index((0, 0), size)
        actual_action = transform_index(move_to_index(action, size),
                                        THTransformation.diagonal_right_down,
                                        size)

        assert expected_action == actual_action