Merge Python Branch into Main #1
|
@ -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
|
||||||
|
|
|
@ -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()")
|
||||||
|
|
Loading…
Reference in a new issue