Merge Python Branch into Main #1
|
@ -26,6 +26,7 @@ if response.status_code == 200:
|
|||
else:
|
||||
print("Error: " + response.json()["error"])
|
||||
|
||||
|
||||
def api_wdl() -> str:
|
||||
"""
|
||||
Returns the current wdl from the REST API
|
||||
|
|
|
@ -2,9 +2,10 @@ from blunderboard.blunderevaluator import BlunderEvaluator
|
|||
from blunderboard.boardreader import BoardReader
|
||||
from blunderboard.movegenerator import MoveGenerator
|
||||
from time import sleep
|
||||
import cProfile
|
||||
|
||||
|
||||
def main():
|
||||
def main_content():
|
||||
blunder_evaluator = BlunderEvaluator()
|
||||
move_generator = MoveGenerator(blunder_evaluator)
|
||||
reader = BoardReader(move_generator)
|
||||
|
@ -13,3 +14,11 @@ def main():
|
|||
while True:
|
||||
reader.scan()
|
||||
sleep(0.1)
|
||||
|
||||
|
||||
def main():
|
||||
cProfile.run("all()")
|
||||
|
||||
|
||||
# run main with cProfile
|
||||
cProfile.run("main()")
|
||||
|
|
Loading…
Reference in a new issue