Dynamic number of players

This commit is contained in:
Frank
2026-01-08 15:49:47 +01:00
parent 0ac2618f7d
commit cdb469456f
8 changed files with 204 additions and 114 deletions
+11
View File
@@ -70,6 +70,17 @@ final class GameController extends AbstractController
$this->addFlash('error', 'Could not leave session (game might have started).');
}
}
} elseif ($request->request->has('start_session')) {
$sessionId = $request->request->get('session_id');
$session = $sessionRepository->find($sessionId);
if ($session) {
if ($dashboardService->startSession($session)) {
$this->addFlash('success', 'Session started! Screens have been assigned.');
} else {
$this->addFlash('error', 'Could not start session. Make sure all players have joined.');
}
}
}
return $this->redirectToRoute('game_dashboard');