Merge Python Branch into Main #1

Merged
hagi merged 45 commits from python into main 2022-12-30 19:15:27 +00:00
2 changed files with 11 additions and 1 deletions
Showing only changes of commit bd39c07582 - Show all commits

View file

@ -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

View file

@ -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()")