This commit is contained in:
hagi 2022-12-30 15:33:28 +01:00
parent 95bec44719
commit bd39c07582
2 changed files with 11 additions and 1 deletions

View file

@ -26,6 +26,7 @@ if response.status_code == 200:
else: else:
print("Error: " + response.json()["error"]) print("Error: " + response.json()["error"])
def api_wdl() -> str: def api_wdl() -> str:
""" """
Returns the current wdl from the REST API Returns the current wdl from the REST API

View file

@ -2,9 +2,10 @@ from blunderboard.blunderevaluator import BlunderEvaluator
from blunderboard.boardreader import BoardReader from blunderboard.boardreader import BoardReader
from blunderboard.movegenerator import MoveGenerator from blunderboard.movegenerator import MoveGenerator
from time import sleep from time import sleep
import cProfile
def main(): def main_content():
blunder_evaluator = BlunderEvaluator() blunder_evaluator = BlunderEvaluator()
move_generator = MoveGenerator(blunder_evaluator) move_generator = MoveGenerator(blunder_evaluator)
reader = BoardReader(move_generator) reader = BoardReader(move_generator)
@ -13,3 +14,11 @@ def main():
while True: while True:
reader.scan() reader.scan()
sleep(0.1) sleep(0.1)
def main():
cProfile.run("all()")
# run main with cProfile
cProfile.run("main()")