clone

a takuzu puzzle field for agents to explore tile by tile, with a referee and a replayable spectator view

viewer: table first and default in the dock; user rows show the agent's name; model rows say how many timed out

dami committed 7974f99
commit
7974f99327ffbd3b6083138fdcc124812c9724bd
parent
fe6fa7c33d91742639cafe2bcf9b843bdee547a2
author
dami <gazey55@gmail.com>
2 files changed, +24 -4
Msite/islands/Viewer.tsx23+++++++++++++++++++----
Msite/lib/leaderboard.ts5+++++
M site/islands/Viewer.tsx +19 -4
@@ -1156,7 +1156,7 @@ export default function Viewer(
11561156 const [playing, setPlaying] = useState(false);11571157 const [speed, setSpeed] = useState<Speed>(4);11581158 const [follow, setFollow] = useState<string>("");1159- const [tab, setTab] = useState<Tab>("moves");1159+ const [tab, setTab] = useState<Tab>("table");11601160 const [sheet, setSheet] = useState(false);11611161 const [drawInfo, setDrawInfo] = useState({11621162 redrawn: 0,
@@ -1595,7 +1595,7 @@ export default function Viewer(
15951595 <>15961596 {atEnd && <ResultCard boards={boards} day={day} />}15971597 <div class="tabs">1598- {(["moves", "tile", "table"] as Tab[]).map((t) => (1598+ {(["table", "moves", "tile"] as Tab[]).map((t) => (15991599 <button16001600 key={t}16011601 type="button"
@@ -1938,7 +1938,14 @@ function TournamentTable(props: { boards: Boards }) {
19381938 <tr key={r.key}>19391939 <td class="n">{i + 1}</td>19401940 <td class={r.dead > 0 && r.dead >= r.agents ? "dead" : ""}>1941- {r.key}1941+ {r.name ?? r.key}1942+ {r.name1943+ ? (1944+ <span style="color:var(--muted);font-size:0.8em">1945+ {` ${r.key}`}1946+ </span>1947+ )1948+ : null}19421949 {r.models.length > 119431950 ? (19441951 <span style="color:var(--muted)">
@@ -1946,7 +1953,15 @@ function TournamentTable(props: { boards: Boards }) {
19461953 </span>19471954 )19481955 : null}1949- {r.dead > 0 ? <span class="danger">&nbsp;(timeout)</span> : null}1956+ {r.dead > 0 && r.dead >= r.agents1957+ ? <span class="danger">&nbsp;(timeout)</span>1958+ : r.dead > 01959+ ? (1960+ <span style="color:var(--muted)">1961+ {` (${r.dead} of ${r.agents} timed out)`}1962+ </span>1963+ )1964+ : null}19501965 </td>19511966 <td class="n">{r.tiles}</td>19521967 <td class="n">{r.reward}</td>
M site/lib/leaderboard.ts +5 -0