Add admin-only CPU tables with per-hand reviews

A new table type, "review" (レビュー付きCPU戦), can only be created by
admins. Only the creator and CPUs sit there: friends cannot join, and the
table is hidden from non-admin lobbies. After every hand a review opens,
and the next hand waits until the creator presses "次のハンドへ".

- Preflop: shows which color of the registered hand range the hole cards
  are and whether the action followed it. With no entrant before you,
  open with the color for the number of players still to act; facing an
  entrant, estimate their range from their position, call one color
  above it and raise two above. Purple ranks just below white (SB only).
- Flop onward: equity vs ranges estimated from those colors (narrowed by
  later bets/calls) gives a rough EV per option. The score is the EV lost
  against the best option, relative to the pot. It is a guide, not GTO.
- Also: pot-odds call check, all-in equity and luck-adjusted P&L,
  VPIP/PFR/3bet/Cbet/WTSD/W$SD/AF, per-color and per-position compliance,
  habits to watch, worst-5 hands, a P&L chart and a step-by-step replay
  on the admin-only /review page.

Hand now logs every action for the review. The range data moves to
admin/range-data.js, shared by the range page and the server. Reviews are
saved under data/reviews/ (newest 50 sessions). Admin scripts and CSS are
no longer cached for a day, so updates show up immediately.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
agomizi1cmandClaude Opus 5.5 committed 2026-10-19 22:11:16 +09:00
1 parent 3116b1da9f
commit 3f2515a9fa
25 files changed
+2262 -60

No files matched your search

+35
View File
@@ -258,6 +258,7 @@ input.invalid { border-color: var(--red); }
/* 選択肢を横に並べたラジオボタン(テーブルの種類・CPU の人数) */
.segmented { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; }
.segmented label { margin: 0; display: block; color: var(--text); }
.segmented label[hidden] { display: none; }
.segmented input { position: absolute; opacity: 0; width: 0; height: 0; }
.segmented span {
display: flex;
@@ -790,3 +791,37 @@ body.table-page {
.slash { flex: none !important; color: var(--muted); font-weight: 800; }
label.switch { margin: 0; display: inline-block; }
.link-gold { color: var(--gold); }
/* ---------- レビュー付きCPU戦(ハンドごとのレビュー) ---------- */
.review-modal { max-width: 440px; max-height: calc(100dvh - 32px); overflow-y: auto; overscroll-behavior: contain; }
.review-buttons { display: grid; grid-template-columns: 1fr 2fr; gap: 8px; margin-top: 16px; }
.review-buttons:has(> [hidden]) { grid-template-columns: 1fr; }
.review-link { display: block; margin-top: 12px; font-size: 13px; text-align: center; }
.rv-head { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.rv-cards { display: flex; gap: 3px; }
.rv-hand { font-size: 20px; }
.rv-sub { color: var(--muted); font-size: 12px; margin-top: 2px; }
.rv-sub b { color: var(--text); }
.rv-section { font-size: 12px; font-weight: 800; color: var(--gold); margin: 14px 0 6px; }
.rv-item { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; padding: 6px 0; border-top: 1px solid var(--line); }
.rv-mark { flex: none; width: 24px; text-align: center; font-weight: 900; font-size: 16px; }
.rv-mark.great { color: var(--green); }
.rv-mark.good { color: #8fd18f; }
.rv-mark.warn { color: var(--orange); }
.rv-mark.bad { color: var(--red); }
.rv-score { color: var(--gold); font-weight: 800; font-size: 13px; }
.rv-streets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 12px; }
.rv-street { background: var(--panel); border-radius: 10px; padding: 6px 4px; text-align: center; }
.rv-street span { display: block; font-size: 11px; color: var(--muted); }
.rv-street b { font-size: 18px; }
.rv-foot { margin-top: 14px; font-size: 13px; color: var(--muted); }
/* 登録してあるハンドレンジの色(レンジ表のデータとしての色なのでサイトの配色とは別) */
.rv-color { display: inline-block; font-size: 13px; font-weight: 800; padding: 2px 8px; border-radius: 6px; vertical-align: middle; background: var(--c); color: var(--fg); }
.rv-color.cat-purple { box-shadow: inset 0 0 0 2px #9b59d0; }
.rv-color.cat-navy { --c: #20365d; --fg: #fff; box-shadow: inset 0 0 0 1px #4d6a9c; }
.rv-color.cat-red { --c: #9e342e; --fg: #fff; }
.rv-color.cat-yellow { --c: #ddb356; --fg: #14191f; }
.rv-color.cat-green { --c: #4e8051; --fg: #101910; }
.rv-color.cat-blue { --c: #6aa5c9; --fg: #14191f; }
.rv-color.cat-white { --c: #f7f7f7; --fg: #222; }
.rv-color.cat-gray, .rv-color.cat-purple { --c: #929292; --fg: #222; }