from mower.utils import config
from mower.utils import typealias as tp


def number(scope: tp.Scope, height: int, thres: int) -> int:
    "数字识别"
    return config.recog.num.number_int("secret_front", scope, height, thres, rect_ed=-3)


def is_full() -> bool:
    "判断模块增补仪和条是否刷满"
    if number(((150, 975), (300, 1030)), 50, 100) != 60:
        return False
    if number(((530, 975), (680, 1030)), 50, 100) != 24:
        return False
    return True
