Пример #1
0
def output(*, task_info=None):
    """
    输出
    """
    fusiden.rsleep(1)
    namespace.count += 1
    os.write(1, b"\x1b[2J\x1b[H")
    print(f'count: {namespace.count}')
Пример #2
0
 def _output(*, task_info=None):
     """
     输出
     """
     nonlocal count
     fusiden.rsleep(1)
     count += 1
     os.write(1, b"\x1b[2J\x1b[H")
     print(f'count: {count}')
Пример #3
0
    def _init_map(*, task_info=None):
        nonlocal flag
        if flag is True:
            # drag up
            for _ in range(random.randint(1, 2)):
                random_x_start = random.randint(300, 1200)
                random_y_start = random.randint(200, 600)
                random_x_end = random.randint(300, 1200)
                random_y_end = random_y_start + 4000

                gf.swipe([random_x_start, random_y_start],
                         [random_x_end, random_y_end])
            fusiden.rsleep(0.2)
Пример #4
0
    def _init_map(*, task_info=None):
        nonlocal flag
        if flag is True:
            # 下拉地图
            for _ in range(random.randint(1, 2)):
                random_x_start = random.randint(300, 1200)
                random_y_start = random.randint(200, 600)
                random_x_end = random.randint(300, 1200)
                random_y_end = random_y_start - 4000

                gf.swipe([random_x_start, random_y_start],
                         [random_x_end, random_y_end])
            fusiden.rsleep(0.2)
            # 上拉地图
            random_x_start = random.randint(600, 1200)
            random_x_end = random.randint(600, 1200)
            random_y_start = random.randint(50, 340)
            random_y_end = random_y_start + 400
            gf.swipe([random_x_start, random_y_start],
                     [random_x_end, random_y_end],
                     duration=1200, radius=0, delta=0)