feat(game): add configurable rounds per room
This commit is contained in:
+5
-1
@@ -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}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user