Skip to content

Commit

Permalink
部分数值调整与测试位置调整
Browse files Browse the repository at this point in the history
  • Loading branch information
HSLix committed Sep 26, 2023
1 parent 76b751c commit a91dcf0
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
4 changes: 1 addition & 3 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

from src.gui.scriptGUI import scriptGUI
#from src.common import getPic, autoFindOrClick as afc
from src.test.tryClick import tryClick
from win32event import CreateMutex
from win32api import GetLastError
from sys import exit
Expand All @@ -18,8 +17,7 @@


if __name__ == '__main__':
# 测试识图
# tryClick("./pic/team/FullTeam44.png", "1", 0, 0, 1, 1, 0.98)


# 互斥锁
mutex = CreateMutex(None, False, 'LALC.Running')
Expand Down
5 changes: 5 additions & 0 deletions src/gui/scriptGUI.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,18 @@
'''
from src.gui.myGUI import myGUI
from src.log.nbLog import beginAndFinishLog
from src.test.tryClick import tryClick


@beginAndFinishLog
def scriptGUI():
'''调用图形化函数'''
#图形操作窗口
gui = myGUI()

# 测试识图
tryClick("./pic/team/EmptyTeam03.png", "1", 0, 0, 1, 1, 0.99)

gui.showWin()


14 changes: 7 additions & 7 deletions src/script/classMir.py
Original file line number Diff line number Diff line change
Expand Up @@ -815,15 +815,15 @@ def mirror1Cope(self):
def mirror1JudTeamCondition(self):
resultCondition = -1
if(afc.autoFind("./pic/team/FullTeam55.png", "FullTeam5/5", 0.99) or\
afc.autoFind("./pic/team/FullTeam44.png", "FullTeam4/4", 0.98) or\
afc.autoFind("./pic/team/FullTeam44.png", "FullTeam4/4", 0.99) or\
afc.autoFind("./pic/team/FullTeam33.png", "FullTeam3/3", 0.993)):
resultCondition = 0
elif(afc.autoFind("./pic/team/EmptyTeam03.png", "EmptyTeam0/3", 0.98)):
elif(afc.autoFind("./pic/team/EmptyTeam03.png", "EmptyTeam0/3", 0.99)):
resultCondition = 1
elif(afc.autoFind("./pic/team/EmptyTeam04.png", "EmptyTeam0/4", 0.98) or\
afc.autoFind("./pic/team/NotFullTeam34.png", "NotFullTeam3/4", 0.98)):
elif(afc.autoFind("./pic/team/EmptyTeam04.png", "EmptyTeam0/4", 0.99) or\
afc.autoFind("./pic/team/NotFullTeam34.png", "NotFullTeam3/4", 0.99)):
resultCondition = 2
elif(afc.autoFind("./pic/team/EmptyTeam05.png", "EmptyTeam0/5", 0.98) or\
elif(afc.autoFind("./pic/team/EmptyTeam05.png", "EmptyTeam0/5", 0.99) or\
afc.autoFind("./pic/team/NotFullTeam45.png", "NotFullTeam4/5", 0.99)):
resultCondition = 3
return resultCondition
Expand All @@ -838,14 +838,14 @@ def mirror1JudFullTeam(self,condition):
if(afc.autoFind("./pic/team/FullTeam33.png", "FullTeam3/3", 0.992)):
result = True
elif(condition == 2):
if(afc.autoFind("./pic/team/FullTeam44.png", "FullTeam4/4", 0.96)):
if(afc.autoFind("./pic/team/FullTeam44.png", "FullTeam4/4", 0.99)):
result = True
elif(condition == 3):
if(afc.autoFind("./pic/team/FullTeam55.png", "FullTeam5/5", 0.99)):
result = True
else:
if(afc.autoFind("./pic/team/FullTeam55.png", "FullTeam5/5", 0.99) or\
afc.autoFind("./pic/team/FullTeam44.png", "FullTeam4/4", 0.96) or\
afc.autoFind("./pic/team/FullTeam44.png", "FullTeam4/4", 0.99) or\
afc.autoFind("./pic/team/FullTeam33.png", "FullTeam3/3", 0.992)):
result = True
return result
Expand Down

0 comments on commit a91dcf0

Please sign in to comment.