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