Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
exapunks-hackmatch-bot
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Taddeüs Kroes
exapunks-hackmatch-bot
Commits
a4129c62
Commit
a4129c62
authored
Apr 09, 2020
by
Taddeüs Kroes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Print board parsing time
parent
29be6a54
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
bot.py
bot.py
+5
-2
No files found.
bot.py
View file @
a4129c62
...
...
@@ -47,15 +47,18 @@ if __name__ == '__main__':
try
:
board
=
screenshot_board
(
win
)
start
=
time
.
time
()
state
=
State
.
detect
(
board
)
vprint
(
'
\
033
c'
,
'parsed:'
,
sep
=
''
)
end
=
time
.
time
()
vprint
(
'
\
033
c'
,
end
=
''
)
vprint
(
'parsed in'
,
round
((
end
-
start
)
*
1000
,
1
),
'ms:'
)
vprint_state
(
state
)
vprint
()
start
=
time
.
time
()
solution
=
state
.
solve
()
end
=
time
.
time
()
vprint
(
'thought for'
,
round
((
end
-
start
)
*
1000
,
1
),
'm
illisecond
s'
)
vprint
(
'thought for'
,
round
((
end
-
start
)
*
1000
,
1
),
'ms'
)
except
(
TypeError
,
AssertionError
):
vprint
(
'
\
r
error during parsing, wait for a bit...'
,
end
=
''
)
time
.
sleep
(
0.050
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment