-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Check whether autoplay is executed correctly #38
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need some changes, see comments for details.
client.py
Outdated
isliqi = self.isLiqi | ||
self.action.mjai2action(self.app.mjai_msg_dict[self.flow_id][-1], self.tehai, self.tsumohai, isliqi, False) | ||
self.isLiqi = False | ||
self.app.action_verify_job = self.set_interval(1.5, self.app.dahai_verfication) | ||
self.app.dahaiyanzhenhg = self.set_interval(2.5, self.dahai_yanzheng) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't use "yanzheng".
client.py
Outdated
@@ -476,15 +476,12 @@ def __init__(self, rpc_server, *args, **kwargs) -> None: | |||
self.mjai_msg_dict = dict() # flow.id -> List[mjai_msg] | |||
self.akagi_log_dict = dict() # flow.id -> List[akagi_log] | |||
self.mitm_started = False | |||
self.action_verify_job = None | |||
self.dahaiyanzhenhg = None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move the verify job into FlowScreen.
client.py
Outdated
self.stopA = self.action_verify_job.stop() | ||
if liqi_msg['data']['name'] in ['ActionDealTile', 'ActionDiscardTile', 'ActionChiPengGang', 'ActionAnGangAddGang', 'ActionBaBei', 'ActionHule', 'ActionLiuJu', 'ActionNoTile']: | ||
if self.dahaiyanzhenhg is not None: | ||
self.stopA = self.dahaiyanzhenhg.stop() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move the verify job into FlowScreen.
stopA
is bad var name.
client.py
Outdated
@@ -577,7 +576,7 @@ def mitm_connected(self): | |||
def action_quit(self) -> None: | |||
self.update_flow.stop() | |||
self.get_messages_flow.stop() | |||
self.action_verify_job.stop() | |||
self.dahaiyanzhenhg.stop() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move the verify job into FlowScreen.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comments for more details.
检查所有操作是否成功执行,若没有执行,则每间隔1.5秒再执行一次,直到成功。