Oops
This commit is contained in:
@@ -36,7 +36,6 @@ class GameController:
|
||||
self._game_service.start(white_name, black_name, time_control, increment)
|
||||
self._has_started = True
|
||||
return jsonify({"status": "ok", "message": "Game started"}), 200
|
||||
|
||||
except ServiceException as ex:
|
||||
return jsonify({"status": "error", "message": f"An error occurred : {ex}"}), 400
|
||||
except Exception as ex:
|
||||
|
||||
@@ -29,12 +29,9 @@ class GameService:
|
||||
def make_move(self) -> tuple[bytes, str] | None:
|
||||
try :
|
||||
if not self._has_started :
|
||||
raise ServiceException("Game hasn't started yet.")
|
||||
raise Exception("Game hasn't started yet.")
|
||||
self._clock_service.switch()
|
||||
return self._detection_service.analyze_single_frame()
|
||||
except ServiceException as se:
|
||||
print(se)
|
||||
return None
|
||||
except Exception as ex:
|
||||
print(ex)
|
||||
return None
|
||||
except Exception as e:
|
||||
print(e)
|
||||
raise ServiceException(e)
|
||||
|
||||
Reference in New Issue
Block a user