feat(game): add configurable rounds per room

This commit is contained in:
jessy-david-dev
2026-04-11 13:47:05 +02:00
parent d245232497
commit e9f39c572d
8 changed files with 175 additions and 114 deletions
+5 -1
View File
@@ -12,6 +12,8 @@ export default function WikiRush() {
const [screen, setScreen] = useState<Screen>("home");
const [playerName, setPlayerName] = useState("");
const [joinCode, setJoinCode] = useState("");
const [maxPlayers, setMaxPlayers] = useState(16);
const [totalRounds, setTotalRounds] = useState(3);
const [error, setError] = useState<string | null>(null);
const [loading, setLoading] = useState(false);
const [showAuth, setShowAuth] = useState(false);
@@ -20,7 +22,7 @@ export default function WikiRush() {
const multi = useMultiGame();
const { session } = useGameEffects({ solo, multi, screen, setScreen, setPlayerName });
const handlers = useGameHandlers({ solo, multi, playerName, joinCode, setScreen, setError, setLoading });
const handlers = useGameHandlers({ solo, multi, playerName, joinCode, maxPlayers, totalRounds, setScreen, setError, setLoading });
return (
<ScreenRouter
@@ -28,6 +30,8 @@ export default function WikiRush() {
solo={solo} multi={multi} handlers={handlers}
playerName={playerName} setPlayerName={setPlayerName}
joinCode={joinCode} setJoinCode={setJoinCode}
maxPlayers={maxPlayers} setMaxPlayers={setMaxPlayers}
totalRounds={totalRounds} setTotalRounds={setTotalRounds}
error={error} setError={setError} loading={loading}
showAuth={showAuth} setShowAuth={setShowAuth}
/>