This commit is contained in:
2026-01-01 03:19:55 +01:00
parent c4b704721e
commit b9e3d9baf1
3 changed files with 4 additions and 8 deletions

View File

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

View File

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