game progress

This commit is contained in:
Theo Browne
2026-02-20 02:49:19 -08:00
parent 6bd3718cad
commit 104eb8e73e
3 changed files with 61 additions and 12 deletions

View File

@@ -396,19 +396,39 @@ function App() {
<div className="layout">
<main className="main" ref={mainRef}>
{state.active && <Arena round={state.active} total={totalRounds} />}
{(() => {
const isGeneratingNextPrompt = state.active && state.active.phase === "prompting" && !state.active.prompt;
const lastCompleted = state.completed[state.completed.length - 1];
{!state.active && !state.done && state.completed.length > 0 && (
<div className="arena-waiting">
Next round starting<span className="dots"><span>.</span><span>.</span><span>.</span></span>
</div>
)}
if (isGeneratingNextPrompt && lastCompleted) {
return (
<>
<Arena round={lastCompleted} total={totalRounds} />
<div className="next-round-toast">
<ModelName model={state.active!.prompter} /> is cooking up the next prompt<span className="dots"><span>.</span><span>.</span><span>.</span></span>
</div>
</>
);
}
{!state.active && !state.done && state.completed.length === 0 && (
<div className="arena-waiting">
Game starting<span className="dots"><span>.</span><span>.</span><span>.</span></span>
</div>
)}
if (state.active) {
return <Arena round={state.active} total={totalRounds} />;
}
if (!state.active && !state.done && state.completed.length > 0) {
return <Arena round={lastCompleted} total={totalRounds} />;
}
if (!state.active && !state.done && state.completed.length === 0) {
return (
<div className="arena-waiting">
Game starting<span className="dots"><span>.</span><span>.</span><span>.</span></span>
</div>
);
}
return null;
})()}
{state.done && <GameOver scores={state.scores} />}
</main>