Skip to content

Casino: 2 rooms + Playing Preflop lesson (circular table, reacting coach) - #3

Open
notAidven wants to merge 1 commit into
feature/casino-ai-tablesfrom
feature/casino-2rooms-preflop
Open

Casino: 2 rooms + Playing Preflop lesson (circular table, reacting coach)#3
notAidven wants to merge 1 commit into
feature/casino-ai-tablesfrom
feature/casino-2rooms-preflop

Conversation

@notAidven

Copy link
Copy Markdown
Owner

Stacked on #1 (feature/casino-ai-tables), so this diff shows only the 2-room casino redesign and the new preflop lesson.

Part A — new "Playing Preflop" lesson

A new lesson in Playing a Hand, placed before the Casino Floor nodes. It teaches:

  • Preflop betting basics: blinds + position context, and the three options (fold / call-or-limp / raise-or-open). Built on the existing betting-round interaction with street: 'preflop'.
  • Suited vs offsuit: same-suit hole cards can make a flush, so suited is slightly stronger.
  • Reading starting-hand strength: premium pairs, big broadways, suited play, junk, with position context.

New small interaction preflop-hand (two modes: classify a hand's tier, and pick-stronger between two hands) with an auto-derived suited/offsuit tag. Reuses betting-round for the preflop decision spots. Beginner-friendly, no em dashes, glossary bold-term popovers preserved (added: suited, offsuit, premium, broadway, pocket pair, suited connector, open, limp, starting hand).

Wired in: data/lessons.ts (Playing a Hand, before the casino nodes), lessonContent.ts, skillCheckContent.ts + skillChecks/skill-check-preflop.ts. The course path now shows 9 lessons in sequential order via a new lessonNumber() helper (so the string-id preflop lesson still reads as a number on the path/home/modal).

Part B — Casino redesign: 5 tables → exactly 2 rooms

  • data/tables.ts: Room 1 = rule-based opponents + AI coach; Room 2 = LLM opponents + the rule-based hint bar (no coach). One sensible config each.
  • Unlock (lib/lessonProgress.ts): Room 1 unlocks when all lessons are complete; Room 2 unlocks after Room 1 is cleared.
  • Table UI (components/table/*):
    • Circular / oval board with seats arranged around a round felt.
    • Action controls moved into a side rail next to the board, so the whole table + actions + coach fit on screen without scrolling.
    • Coach panel visible beside the board in Room 1, and it now reacts to every play (fold/check/call/raise) with a short, supportive, guiding note. The reaction is rule-based (derived from the rule AI + analyzeSpot) and works fully with AI off.
    • Hand log grouped by street (Preflop / Flop / Turn / River / Result), concise entries, dealing noise dropped.
    • Responsive (near-square felt on phones, oval on desktop). Play-money framing only. No em dashes.

Guardrails respected: no auth/profile files touched; AI-off guarantee intact (rule opponents, rule coach/hints, "AI offline" badge); hand engine (lib/poker/handEngine.ts) untouched.

Files touched

  • Data/logic: data/tables.ts, data/lessons.ts, data/lessonContent.ts, data/skillCheckContent.ts, data/glossary.ts, data/course.ts, lib/lessonProgress.ts, types/lesson.ts
  • New content: data/lessons/lesson-preflop.ts, data/skillChecks/skill-check-preflop.ts, components/lesson/interactions/PreflopHand.tsx, components/lesson/InteractionRenderer.tsx
  • Display: components/CoursePath.tsx, components/LessonPathModal.tsx, pages/HomePage.tsx
  • Table UI: components/table/PokerTable.tsx, CoachPanel.tsx, Seat.tsx, tableRuntime.ts
  • Tests/scripts: components/table/tableRuntime.test.ts, lib/bankroll.test.ts, scripts/mvp-logic-check.mjs

Verification (from web/)

  • npm run build — exit 0
  • npx vitest run — 409 passed
  • node_modules/.bin/tsc -p tsconfig.app.json --noEmit — clean
  • node scripts/mvp-logic-check.mjs — all pass (updated for 9 lessons + 2 rooms)

Manual visual-QA checklist

  • Course path shows 9 lessons (the preflop lesson reads as "5", in Playing a Hand) and exactly 2 casino rooms.
  • Preflop lesson plays end to end: concept steps, betting-round preflop spots, and the new preflop-hand interaction (suited/offsuit tag, classify + pick-stronger), with correct/incorrect feedback, non-revealing hints, and "why".
  • Skill check for the preflop lesson passes at 2/3.
  • Room 1: circular/oval board; action controls + coach visible beside the board with no scrolling in a normal viewport; the coach reacts after each fold/check/call/raise (supportive + guiding), even with AI off ("AI offline" badge present).
  • Room 2: same circular board; rule-based hint bar shown (no coach).
  • Hand log is grouped by street and easy to read.
  • Responsive on phone and desktop.

Do not auto-merge.

Made with Cursor

Part A - new "Playing Preflop" lesson in Playing a Hand, placed before the
Casino Floor. Teaches preflop betting (open/limp/call/raise/fold with blinds
and position), suited vs offsuit, and reading starting-hand strength. Adds a
small preflop-hand interaction (classify + pick-stronger) and reuses
betting-round for preflop spots. Wired into lessons.ts, lessonContent,
skillCheckContent + a new skill check, and the glossary. The path shows 9
lessons via a new lessonNumber() helper, so the inserted lesson reads in order.

Part B - collapse the 5 casino tables into exactly 2 rooms: Room 1 (rule-based
opponents + an AI coach) and Room 2 (LLM opponents + the rule-based hint bar,
no coach). Redesign the table as a circular/oval board with seats around the
felt; move the action controls into a side rail with the coach so the whole
table, actions, and coach fit without scrolling; the coach now reacts to every
play with a supportive, rule-based note (works fully with AI off); and the hand
log is grouped by street. Unlock: Room 1 after all lessons, Room 2 after Room 1
is cleared.

AI-off guarantee and the hand engine are untouched. Tests and the
mvp-logic-check script are updated for 9 lessons and the 2-room casino.

Co-authored-by: Cursor <cursoragent@cursor.com>
notAidven added a commit that referenced this pull request Jun 26, 2026
 Cloudflare proxy) into integration

Co-authored-by: Cursor <cursoragent@cursor.com>

# Conflicts:
#	web/src/pages/ProfilePage.tsx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant