Add CPU opponents and a table type selector (cash only / friends / CPU)
- Create screen: choose キャッシュオンリー (real cards, chips only), 友人戦 (server deals and settles) or CPU戦 (友人戦 plus 1–8 CPU players); replaces the card toggle. The lobby shows each table's type - Poker AI written from scratch (server/ai.js, no libraries): fast 7-card evaluator (checked against bestHand), Monte Carlo equity, and decisions from hand rank, pot odds, raise count, opponents and a per-CPU style (aggression, bluff rate); continuation bets via the last aggressor. It never sees other players' hole cards - CPU seats: think time of 0.7–1.8s (faster when no human is left in the hand), automatic rebuy, never the host, no new hand unless a human is playing, re-think after pause - Play UI: robot avatars and a "考えています…" status for CPU turns - Tests for the evaluator, equity, legality of AI actions and CPU tables Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
66907345ff
commit
0d3a054f0d
12 files changed
+550
-46
No files matched your search
@@ -255,6 +255,29 @@ input.invalid { border-color: var(--red); }
|
||||
.switch input:checked + span::before { transform: translateX(22px); background: #fff; }
|
||||
.switch input:focus-visible + span { outline: 2px solid var(--gold); }
|
||||
|
||||
/* 選択肢を横に並べたラジオボタン(テーブルの種類・CPU の人数) */
|
||||
.segmented { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; }
|
||||
.segmented label { margin: 0; display: block; color: var(--text); }
|
||||
.segmented input { position: absolute; opacity: 0; width: 0; height: 0; }
|
||||
.segmented span {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
min-height: 52px;
|
||||
padding: 6px 4px;
|
||||
border-radius: 12px;
|
||||
background: var(--input);
|
||||
border: 2px solid transparent;
|
||||
font-weight: 800;
|
||||
font-size: 14px;
|
||||
line-height: 1.2;
|
||||
cursor: pointer;
|
||||
}
|
||||
.segmented input:checked + span { background: rgba(246, 199, 68, 0.15); border-color: var(--gold); color: var(--gold); }
|
||||
.segmented input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
|
||||
.segmented.numbers span { min-height: 40px; font-size: 15px; }
|
||||
|
||||
.unit-input { position: relative; }
|
||||
.unit-input input { padding-right: 56px; }
|
||||
.unit-input .unit {
|
||||
@@ -400,6 +423,7 @@ body.table-page {
|
||||
}
|
||||
.avatar svg { width: 28px; height: 28px; fill: #fff; }
|
||||
.seat.me .avatar { background: #d35400; border-color: var(--gold); }
|
||||
.seat.bot .avatar { background: #3d4a6b; border-color: #8fa2d6; }
|
||||
.seat.offline .avatar { opacity: 0.45; }
|
||||
.nameplate {
|
||||
margin-top: -10px;
|
||||
|
||||
Reference in new issue
Block a user