Commit Graph

181 Commits

Author SHA1 Message Date
Brian Fertig 14c17d2eb0
Track mistakes per cell so corrections and undo/redo adjust the count
- A wrong entry now counts once; erasing, correcting, or undoing it decrements
  the counter instead of accumulating duplicates on every edit.
- Persist mistakeCells in the save and rebuild from existing grid data for
  saves created before this field existed.
2026-11-26 13:27:54 -07:00
Brian Fertig 0223a191fc
Add video background option to Mahjong Match
- Register three looping mp4 backdrops in the asset manifest alongside the existing images.
- Add an Image | Video segmented toggle on the layout-select screen; choice persists in localStorage and defaults to Video.
- Render a muted, looping, letterboxed video behind the tiles with a scrim, falling back to image backdrops if no video is cached.
- Defer re-fitting after Phaser swaps in the real video frame so the backdrop isn't rendered ~3× zoomed against the 256×256 placeholder.
- Add tools/smokeMahjongMatchBgVideo.mjs Playwright smoke test covering toggle default/persistence, video playback/mute/loop/sizing, and image fallback.
2026-11-26 13:21:01 -07:00
Brian Fertig 14f098e3f1
Rename Scrabble to Wordsmith and rebuild the game as a Reading Room table
- New baked-canvas art (ScrabbleArt), HUD (score sheet, tile tracker, seats, preview tag), dialogs, end screen with coach review, Web Audio SFX, and layout constants replace the old flat Phaser scene
- Split rules into a JSON-safe state machine in ScrabbleLogic (seeded RNG for resumable saves) plus challenge-rule modes (friendly / double / five-point)
- Rewrite the move engine: anchor-based generator with incremental scoring, skill-tiered vocabularies, leave-value equity, plausible phonies, and challenge judgement; add hint, judge, two-letter, and AI-challenge routes
- Add a verifier (tools/verifyWordsmith.js) that soaks full games, checks the generator against a brute-force reference, runs a skill ladder, and validates layout overlap
2026-11-26 12:33:07 -07:00
Brian Fertig 0a421a3392
Redesign word search as "The Rail Edition" puzzle book
- Replace the plain grid UI with a train-carriage scene: baked carriage art, scrolling window view (clouds/far/mid/near/poles), tunnel dips, rail-bed audio, and a spiral-bound book with cover, contents page, and page-turn animation
- Add 15 themed chapters (space through castles) with per-chapter inks, fun-fact words, and secret-message phrases; the generator now packs words so leftover cells spell the message instead of random filler letters
- Introduce four ticket classes (Local/Express/Intercity/Sleeper), a seeded "Today's Route" daily with streak tracking, autosave/resume, hints, scoring, and stats per class and chapter
- Add Web Audio synths for pencil ticks, highlighter swipes, train whistle, letter pings, and the carriage rumble/clack bed (no audio files)
- Extend the server route to accept an optional seed and return ink, message, facts, and seed; move theme data to a shared module
- Add tools/verifyWordSearch.js covering chapter data, generator correctness/perf, selection machine, save/resume validation, daily streaks, layout, art bakes, and a stubbed-Phaser play-through
- Add new opponent convo speech files (juliet-croc/nadia/smasher, michael-bernie) and wire convo entries into opponents.json
2026-11-26 11:21:04 -07:00
Brian Fertig 5f2930c1e1
Overhaul Spelling Bee with curated answers, Daily Hive, and full art pass
- Introduce a tiered answer list (core/familiar) built from ENABLE + web frequency data; non-answer ENABLE words become "Rare Finds" bonus points instead of counting toward the goal
- Rewrite puzzle engine to pre-index words by letter mask, build per-difficulty catalogues with pangram/suffix-share filters, and support seeded generation for a deterministic Daily Hive
- Add Daily Hive mode with streak tracking, best-score history, and date-based seeding
- Replace the dark felt UI with a baked "Apiary at Golden Hour" art set (honeycomb cells, honey jar rank meter, beekeeper's ledger, animated bees, vignette, synthesized buzz)
- Expand SpellingBeeLogic with hint grid, nudge picking, save/parse helpers, and difficulty-aware rank tiers
- Add tools/buildBeeWords.js to regenerate the answer list from frequency data with allow/deny overrides, and tools/verifySpellingBee.js as a headless test harness covering engine, logic, layout, art bake, and scene smoke run
2026-11-26 10:35:26 -07:00
Brian Fertig da558f2df9
Rework Sudoku as "Sunday Paper Café" with canvas art and full play flow
- Add SudokuArt.js: bake all café-themed textures (table, paper, grid, notepad, watch, eraser, clippings) to canvases at runtime; no image assets
- Rewrite SudokuGame.js around the new layout: start page with edition cards and daily puzzle, play screen with cell/digit-first input, keyboard controls, undo/redo, hints, pause flap, win ceremony + solved clipping, autosave/resume, stats and daily streak tracking
- Expand SudokuLogic.js with pure helpers (geometry, conflicts, completed units, history, save validation, daily streak) shared by the scene and the verify tool
- Replace the old generator with a technique-tiered engine: bitmask backtracking solution counting, logic-solver grading (naked/hidden singles, locked candidates, pairs/triples, X-Wing/Swordfish/XY-Wing), seeded deterministic generation for the Daily edition
- Add seed query param to /words/sudoku/start route
- Add tools/verifySudoku.js: headless test suite covering generator correctness and uniqueness, solver soundness, board helpers, hints, undo/redo, save/resume, daily streaks, layout invariants, art bake against a strict fake 2D context, and stubbed-Phaser scene smoke runs
2026-11-26 09:44:16 -07:00
Brian Fertig 9c35504760
Rework Tectonic into a Field Geologist's Notebook experience
- Replace the flat graph-paper UI with a baked-canvas notebook: desk scene,
  watercolour cage plates with inked outlines, specimen tags, and a survey
  certificate win screen (TectonicArt.js).
- Add keyboard play (arrows/WASD cursor, 1-5, Backspace, Ctrl+Z/Y), undo/redo,
  pause overlay, toasts, a first-run field guide, and per-cage completion
  feedback with a seismograph strip.
- Support resuming an in-progress survey from localStorage plus a Daily Survey
  (seeded generation, streaks, best-time tracking).
- Extract shared rules into TectonicLogic.js (cage tracing/inset/colouring,
  history, save validation, daily helpers) and make the puzzle generator
  accept a seed for deterministic boards.
- Add tools/verifyTectonic.js covering the generator, logic, layout, art bake,
  and a stubbed-Phaser scene smoke run.
2026-11-26 08:45:58 -07:00
Brian Fertig d341746a8e
Rewrite Freecell and Solitaire Tour with a shared solitaire scene layer
- Add `src/ui/solitaire/` base scene (SolitaireScene), geometry, sound, and stats
  modules so both games share drag/click input, undo/redo, auto-play, hints,
  timer, win cascade, and per-game records.
- Rebuild Freecell ("the Night Study") on the new layer: canvas-baked room art,
  animated rain/lightning/mantel clock, banker's lamp glow, deal card, and a
  brass plaque HUD. Add numbered/daily deals (1..1,000,000) and a resumable
  best-first solver that powers hints plus an honest "still winnable?" verdict;
  safe auto-play sends provably-safe cards home automatically.
- Rebuild Solitaire Tour with five themed rooms (Golf, Klondike, Pyramid, Take
  Fourteen, Three Shuffles), per-leg controllers in `SolitaireTourLegs.js`,
  golf-style scorecard scoring, save/resume, and tournament vs casual rules.
- Refactor both logic engines to a uniform apply()/legalMoves()/snapshot() API
  with plain-object moves, making them Phaser-free and testable headlessly.
- Add `tools/verifyFreecell.js` and `tools/verifySolitaireTour.js` headless
  suites covering rules, random play, solver replay, snapshots/saves, layout
  bounds, and scene decisions.
- Add tutorials (`tutorial.md`) for both games and a Mahjong background video
  asset; fix multi-card drag skip in CardTableScene to check the dragged id set.
2026-11-25 23:59:34 -07:00
Brian Fertig 40efc183fc
Rework Chinese Checkers into "Moonlit Tea Pavilion" with 2–6 player support
- Rewrite the AI (skill 1–5 ladder with lookahead, anti-blocking awareness) and rules engine to support variable seat counts, partner teams, boxed-in detection, and stalemate/turn-cap endings
- Add fully procedural art (room, board, glass marbles, HUD furniture), marble animator, Web Audio sound effects, pause/end dialogs, and a per-seat HUD with progress pips, speech bubbles, and medals
- Enable 1–5 opponent skill selection in OpponentSelectScene and map the game to the "chinese" soundtrack
- Add headless verification suite (topology, rules, AI legality, self-play soak, skill ladder, layout bounds) at tools/verifyChineseCheckers.js
2026-11-25 22:57:14 -07:00
Brian Fertig 98a6cd56d9
Overhaul Mahjong into a full parlour experience with rich AI and helpers
- Rebuild the table scene: procedural room/table art, persistent tile sprites
  that slide and flip between wall, rack, river and melds, dice break ritual,
  call stamps, speech bubbles and score rolls
- Add MahjongAdvisor (shared by UI and AI): waits, unseen counts, discard
  advice, danger map, hand-pattern compass and opponent reads
- Strengthen the AI skill ladder: value awareness, one-suit commitment, wait
  pricing, defense/folding at skill 5, and explainable claims/discards for the
  coach
- Add house rules (rounds, min faan, faan cap, rob-kong, bonus tiles, stake),
  limit hands (Nine Gates, All Terminals, Four Kongs, Heavenly/Earthly, etc.)
  and robbing the kong in the engine
- New UI: settings/helpers dialogs, scoring slip, end-of-session screen with
  stats and score chart, tile tracker, danger shading, table log, tips
- Web Audio synths for clacks, wash, chime/gong plus rain/murmur ambience
- Expand verifyMahjong: limit-hand fixtures, rob-kong scenario, wall geometry,
  advisor brute-force checks, layout overlap checks, ledger-vs-engine self-play
  and an optional skill ladder benchmark
2026-11-25 22:05:25 -07:00
Brian Fertig e74449ffa1
Redesign Splendor as "The Counting House" with full art, AI planner, and HUD
- Replace the flat UI with a procedural counting-house scene: baked room, baize market, velvet jewel case, tooled-leather ledgers, gilt patron gallery, and Guild Register prestige track (SplendorArt, SplendorLayout, SplendorHud)
- Add three-tier buy highlighting (blaze/gold/near), cost-chip annotations showing what bonuses cover, rivals' reach pawns, hover previews with place names, and gem-flight animations (SplendorFx)
- Rewrite the AI from a 1-ply greedy into a full planner: evaluate prestige, engine demand, targets discounted by turns-to-afford, noble contention, denial, end-race awareness, and skill-gated follow-up lookahead; sensible blunders only for low skills (SplendorAI)
- Extend the rules engine: blind deck reserves hidden from rivals, per-seat stats and awards, explicit noble-choice phase when multiple qualify, effectiveCost/affordState/previewBuy helpers, and shared-place ranking (SplendorLogic)
- Add dialogs (pause/settings, confirm, hand-back tokens, noble choice), a Guild Ledger end screen with charts and honours, and synthesized Web Audio SFX (SplendorDialogs, SplendorEndScreen, SplendorSound)
- Add headless verifier covering rules, preview-vs-reality, AI soak/conservation, skill ladder, layout bounds, and art-sheet sizes (tools/verifySplendor.js)
- Fix TutorialModal to only resume menu music if it was actually playing when the modal opened
2026-11-25 19:18:47 -07:00
Brian Fertig d1906f6b94
Overhaul Dominion table with Steward's Hall art and scoring ceremony
- Add procedural "Steward's Hall" visuals (DominionArt.js): baked oak
  table, candlelight, treasury tiles, baize runner, steward tray, banners,
  parchment panels, and type-coloured card faces for both sizes.
- Extract a pure layout engine (DominionLayout.js) that flexes for 2–4
  players, any basic-pile set, and the kingdom; verify it headlessly with
  tools/verifyDominion.js across every variant.
- Add persistent HUD furniture (DominionHud.js): Steward's tray with coin
  flights, Province/Colony end clock with empty-pile seals, VP token dishes,
  heraldic seat banners, and the brass phase dial.
- Replace the plain game-over modal with "The Reckoning" ceremony
  (DominionEndScreen.js) that counts victory cards group by group and crowns
  the winner; add scoring helpers in DominionScoring.js.
- Fix AI stalling on restricted buys (e.g. Grand Market) by skipping cards
  buyAllowed rejects, and end the turn if a buy is rejected as a safety net.
- Add a kingdom-reveal intro, trash viewer, tuck display for Throne Room /
  King's Court targets, and an all-AI soak that keeps base-game results
  byte-for-byte identical to before the overhaul.
2026-11-25 18:09:17 -07:00
Brian Fertig c530bc5b30
Overhaul Mexican Train: full kitchen-table art, skill-based AI, and house rules 2026-11-25 17:06:41 -07:00
Brian Fertig ec09bb42f5
Rewrite Parchisi as "Monsoon Veranda" with full rules and AI
- Rework game logic to integer progress model (nest/track/home-path/home), add
  opening throw, doubles backs, third-doubles penalty, blockades on the home
  path, capture/home bonuses, share-safe house rule, and stats/history
- Replace AI with a skill 1-5 ladder: exact threat odds, lookahead at skill 5,
  noise/loose play at lower skills, plus hint/explain for the UI
- Split the monolithic scene into focused modules (Board, Layout, Art, Pawns,
  Tray, Hud, Dialogs, EndScreen, Sound) and a thin orchestrating ParchisiGame
- Add procedural "Monsoon Veranda" art (rosewood board, lacquered pawns, brass
  tray/cup, room/props), Web Audio synths, rain loop, dice-cup shake-to-roll,
  3D dice throws, danger rings, opponent chat, and a podium/stats/race-chart end screen
- Allow 2-4 players (minOpponents 1) with per-opponent skill selection, update
  tutorial copy, and add tools/verifyParchisi.js headless rule/AI/layout checks
2026-11-25 14:09:55 -07:00
Brian Fertig 43ca22b63a
Rework backgammon into a full seaside kafeneio experience
- Rewrite the AI with a skill 1–5 ladder: pip-equivalent evaluator with shot counting, primes and blot risk; exact one-sided bear-off table (54k positions) for race play; optional 2-ply lookahead at skill 5; cube double/take decisions with Crawford and dead-cube handling
- Add a procedural art set (olive-wood tavli case, bone/walnut checkers, dice cups, doubling cube, tea glass, komboloi) and a layout module driving every screen rect, including a mirrored home-board option
- Rebuild the scene around the new modules: persistent checker registry with stable ids and animated moves, 3D dice throws planned from real rolls, leather cup shake/throw, HUD plates/slate/ledger, pause menu, cube offer slip, end screen with stats and pip-race chart, Web Audio clacks/slams and looping sea waves
- Expand the rules engine: opening roll, maximum-dice/higher-die enforcement, bar entry and dancing, overshoot bear-off, gammons/backgammons, Jacoby, matches to N with Crawford, per-player stats and move log
- Enable opponent skill selection for backgammon in the opponent scene
- Rewrite the tutorial to match the new table, controls and cube/match features
- Add tools/verifyBackgammon.js covering rules, turn generation vs brute force, bear-off table sanity, AI soak and layout bounds
2026-11-25 12:44:57 -07:00
Brian Fertig 98b4dfdb8e
Rewrite Zahtzee as a game-night dice table with expert AI
- Replace the flat panel UI with baked art: plank room, felt tray, keeper ledge, leather cup, clipboard score pad, and opponent seats
- Add YatziSolver (exact expected-value turn solver) and rework YatziAI into a 5-level skill ladder plus a Coach readout with chase odds
- Generalize Dice3D.planTrayThrow from two dice to N dice with configurable spread/aim
- Split game code into YatziLayout, YatziArt, YatziTray, YatziPad, YatziDialogs, and YatziEndScreen; update YatziGame to drive them
- Extend YatziLogic with Joker modes, per-player stats, upper-par meter, rankings, and a commit log
- Add a tutorial (tutorial.md), enable it in the game registry, and add tools/verifyYatzi.js for headless rule/solver/AI/layout checks
2026-11-25 11:43:45 -07:00
Brian Fertig 01372c1c62
Rebuild Azul as a full tile workshop scene with procedural art, AI, and tests
- Split the monolithic scene into focused modules: layout, art baking, HUD, dialogs, end screen, sound, tile identity tracking, and a verification harness
- Replace the 1-ply greedy AI with an incremental valuation that scores placement points, bonus progress, floor liability, end-timing, denial, exposure, and optional rollouts across a 5-level skill ladder; add free-wall column picking
- Add the free (grey) wall variant end-to-end: per-row/per-column colour constraints, legal-column queries, dump-to-floor when no cell fits, player column choices during scoring, and AI support
- Track all 100 tiles as persistent sprites with stable ids so they slide between bag, plates, centre, lines, walls, floor, and lid instead of being recreated each render
- Bake the Lisbon workshop (azulejo wainscot, oak bench, glazed tiles, plates, tray, bag, lid, panels) into canvas textures with optional colour-blind glyphs; add Web Audio ceramic SFX
- Add quality-of-life UI: hover/keyboard move preview with points and floor cost, drag-to-place, undo until the next player moves, tile tracker, bonus badges, opponent board zoom popover, tooltips, order book, pause/settings, and a detailed end screen with per-round chart
- Extend rules logic with stats, round summaries, placement runs, bonus status, previewMove, tile census, and richer log entries; update sprite and tutorial docs
- Add tools/verifyAzul.js to check rules, preview accuracy, all-AI soak games, the skill ladder, tile-id stability, and screen layout
2026-11-25 01:47:25 -07:00
Brian Fertig 8ef312ef45
Overhaul Catan and Ticket to Ride with procedural art tables, shared 3D dice, skill-scaled AI, end screens, and headless verification tools
- Catan: bake the wooden table, sea frame, caddy, tray, opponent boards and end screen from code; add piece-supply limits, official bank-shortage rule, per-game stats, AI trade reasons, and a felt dice tray using shared 3D dice
- Ticket to Ride: render an antique parchment map with score track, desk pad HUD, dialogs, sound synth, and scoring ceremony; rewrite the AI as a 1–5 skill ladder with network planning and turn-weighted routing; add forced-pass/stall guard, route lock reasons, per-player stats, and face-up market replacement
- Extract the 3D dice cube math and renderer into src/ui/dice/Dice3D.js so Craps and Catan share one implementation
- Add tools/verifyCatan.js and tools/verifyTicketToRide.js for headless rules, soak, AI ladder, dice, and layout checks
- Enable skill selection for Ticket to Ride in the opponent select screen; make MusicPlayer controls positionable for the map corner
2026-11-25 01:09:43 -07:00
Brian Fertig c193d0a4ca
Overhaul Old Maid with card-table kit, AI tells/shuffles, and verification
- Rewrite the game scene on the shared CardTableScene: candlelit Victorian parlour art, oval table, fan hands, drag-to-reorder, dock/pause/rules/scorepad modals, animated deal and pair reveals
- Add shuffle mechanic (applyShuffle) so players can hide the Old Maid's position; AI tracks posKnown and forgets it on shuffles
- Introduce skill-based tells (hopeful/worried) and wantsShuffle bluffing for opponents; lower-skill AIs are honest, high-skill ones mostly bluff
- Allow 1 opponent (minOpponents 1) so Old Maid works as a 2-player game; expose skill selector in OpponentSelectScene
- Track discarded pairs in state and add countCards helper for conservation checks
- Add tools/verifyOldMaid.js covering rules, AI memory/tells, layout collision checks for 2/3/4 players, and an all-AI soak
- Tune Go Fish verification threshold after the no-repeat-target rule change
2026-11-24 21:56:59 -07:00
Brian Fertig 5e7d4bb172
Migrate Go Fish and Hearts to the shared card-table kit
- Rewrite both games on CardTableScene with new table layout (GoFishTable.js,
  HeartsTable.js) and baked room art (GoFishArt.js, HeartsArt.js)
- Add skill-scaled AI for both: Go Fish gains recall/random-ask memory and a
  no-re-ask rule per turn; Hearts tracks voids, the Queen, and moon shots
- Support Go Fish pairs mode, book tracking, and heads-up (minOpponents 1)
- Extend Hearts rules with configurable target score and add/subtract moon modes
- Add headless verification suites (tools/verifyGoFish.js, tools/verifyHearts.js)
  covering rules, AI legality, layout collisions, and all-AI soaks
- Enable skill selection for both games in OpponentSelectScene
2026-11-24 21:53:55 -07:00
Brian Fertig e09986d53f
Rework Uno and Skip-Bo on the shared card-table scene with skill-scaled AIs
- Add `src/ui/cardtable/` kit (CardTableScene base class, TableGeometry,
  TableArt, AITiming) so both games share perspective layout, card sprites,
  ghost hands, plates and opponent pacing.
- Rewrite Uno: official rules plus optional stacking and draw-until-playable,
  UNO! call/catch, Wild +4 bluff/challenge odds, scoring to a target with
  match play, and a 90s-kitchen table with baked card art (UnoArt/UnoTable).
- Rewrite Skip-Bo: skill-scaled AI with stock-chain search and opponent-aware
  discards, match scoring to 500, dining-room table with vintage card art
  (SkipBoArt/SkipBoTable).
- Allow Uno to be played against a single opponent (minOpponents 1).
- Expose the skill slider for uno and skipbo in OpponentSelectScene.
- Add headless `tools/verifyUno.js` and `tools/verifySkipBo.js` covering
  rules, AI legality/skill ordering, layout bounds and all-AI soaks.
2026-11-24 20:57:02 -07:00
Brian Fertig a1bf2bf783
Redesign Phase 10 with a rec-room table, skill-scaled AI, and full tooling
- New perspective card-table layout (Phase10Table.js) and baked art module
  (Phase10Art.js): wood-paneled room, chrome-rim vinyl top, placemats,
  ghost hands, glow/spotlight effects, per-player-count backgrounds.
- Phase10Game rewritten around persistent card sprites with pose-based tweens:
  deal animation, staged laydowns on mats, hit/discard fly-ins, skip slams,
  turn spotlight, plate ladders, dock prompts, sort controls, tooltips, and
  keyboard shortcuts.
- AI (Phase10AI.js) now takes a 1-5 skill level: timing scales with hand
  speed and table pace, lower skills miss laydowns/hits, feed opponents,
  and skip randomly; higher skills avoid feeding phases and target real
  threats. Added adviseHand() for live coaching marks.
- Logic (Phase10Logic.js): orderGroupCards normalizes run position so hits
  work after out-of-order laydowns; skipTargets/applyDiscard enforce valid
  skip targets; takes log tracks discard pick-ups to break card loops.
- PhaseSpec gains groupStatus, laidGroupLabel, groupGoalLabel, cardName for
  live staging coaching and plate labels.
- OpponentSelectScene: enable the skill picker for phase10.
- tools/verifyPhase10.js: headless test suite covering rules, staging
  helpers, AI legality/timing, layout collision checks for 2/3/4 players,
  and an all-AI soak with win-rate assertions.
- NertsArt: export ensureGhostHand so Phase 10 shares the baked ghost-hand
  texture.
2026-11-24 19:08:34 -07:00
Brian Fertig 523b946721
Rework Nerts as a real-time table with paced AI and full visual scene
- Replace the timer-based AI with a perception model (read/notice/pounce/chain/scan) so opponents pace like humans, pounce on awaited cards, and skip pointless work-pile shuffles; add ghost-hand reach/carry timing and a "too slow" race loss
- Add NertsTable.js (Phaser-free projection/layout for 2–4 players, hit-testing, drop snapping) and NertsArt.js (baked table felt/rim/placemats/foundation zone, score pad, ghost hand)
- Rewrite NertsGame.js around persistent card sprites that tween to their state positions: deal animation, countdown, drag with live legal-target highlights, smart click/hotkey plays, idle hints, stall detection with stock rotation/auto-resign, pause/settings modals, count-back scoring and a paper score pad
- Support draw-count setting (1 or 3), opponent pace, and stock rotation/reshuffle in NertsLogic.js; add live foundation counts and completion checks
- Add tools/verifyNerts.js headless suite covering rules, layout bounds/clearance for all player counts, AI pacing invariants, and a multi-round AI soak with card conservation and score checks
2026-11-24 11:08:52 -07:00
Brian Fertig 2d1a673b7e
Rework roulette into a full 3D table with both wheel variants
- Add European single-zero and American double-zero wheels with La Partage
  and the full set of inside bets (splits, corners, streets, trios, basket)
- Rebuild the scene around a perspective-projected felt: baked table art,
  3D wheel bowl/head/ball, chip stacks on the layout, and a dealer's rail
- Plan each spin physically (track, diamond strikes, fret hops) so the ball
  lands on the pre-chosen number instead of a tween to a fixed angle
- Add AI personalities (grinder, sprinkler, martingale, chaser, sections),
  late bets, and per-player memory for the Martingale progression
- Introduce table limits, call bets/racetrack with neighbour stepper, history
  board, wheel cam, speed/felt/table toggles, and tooltips with house edges
- Extract geometry and rules into Phaser-free modules and add a headless
  verification suite covering payouts, hit-testing, AI, and the ball planner
2026-11-24 09:59:28 -07:00
Brian Fertig 7a3205799b
Overhaul craps with full table art, 3D dice, expanded bets, and AI
- Add perspective-projected craps tub: baked felt layout, padded rail, diamond-pyramid walls, house bank, dice bowl, ON/OFF puck (CrapsArt.js)
- True 3D die rendering and physics-lite throw that relabels the cube to match the rolled face (CrapsDice.js)
- Table geometry module with zones, seats, bet lanes, hit-testing shared by art and input (CrapsTable.js)
- Expand rules: Buy/Lay/Big/Hardways and all one-roll props; 3-4-5× odds caps, barred 12s, called-on working, contract bets, come-bet travel, plain-English payout explanations (CrapsLogic.js)
- Rewrite the scene: shared casino dock, per-seat chip stacks in the rail, felt click-through hit-testing, learner hints, roll-history board, results card, speed/felt settings (CrapsGame.js)
- AI profiles gain hardway/prop/lay appetite and injectable RNG for deterministic verification (CrapsAI.js)
- Add headless verifier: 36-combo resolution tables, exact Markov house edges, chip-conservation AI soak, geometry and dice-throw checks (tools/verifyCraps.js)
2026-11-24 09:18:11 -07:00
Brian Fertig d33ab09ae0
Redesign Hold'em table with casino oval art and proper betting rules
- New baked table art (HoldemArt.js) on a shared perspective kit
  (CasinoGeometry.makeProjection), plus layout solver in HoldemTable.js
  that fits cards, stacks, bets and buttons around the felt without overlap
- Correct min-raise tracking via lastRaiseSize; pot odds now include
  current street's bets
- All-in runouts: when nobody can act, deal the board out with live
  equity pills instead of stalling on a single actor
- Side-pot logic fixed so players who bust in the hand still claim their
  share; action skips all-in seats
- New HoldemShowdown.js helpers (bestFive, equity, hand labels, raise
  presets, finishing places) and headless test suite tools/verifyHoldem.js
- Rebuilt UI: casino dock with pre-action toggles, bet slider + pot-size
  presets, tournament panel, TV-style showdown with card glow, busted
  watch/skip flow, and cash-out confirmation on leave
2026-11-23 22:46:40 -07:00
Brian Fertig a103c9ed74
Refactor casino tables to shared perspective geometry and art kit
- Extract table layout into Phaser-free *Table.js modules so headless verify scripts can test projection, hit-testing, payouts, and scoreboard roads
- Add shared casino art pipeline (CasinoArt/CasinoCards/CasinoChips/CasinoDock) that bakes felt, rail, cards, chips, and HUD dock from one perspective model
- Replace per-game hand-drawn tables, betting UI, and chip rendering in Baccarat, Blackjack, and Pai Gow with the shared kit plus game-specific markings
- Add keyboard shortcuts, rebet controls, and a Baccarat bead plate/big road scoreboard
- Extend verifyBaccarat/verifyBlackjack/verifyPaiGowPoker with layout, overlap, and source-lint checks
2026-11-23 20:10:11 -07:00
Brian Fertig d0d412cea9 Add Geometry Wars arcade shooter with warp grid and neon bloom
- Headless sim (GeometryWarsLogic) with evolved and pacifism modes,
  seeded RNG for deterministic replays, and a fixed-tick accumulator loop
- Spring-lattice warp grid that reacts to bullets, explosions and black holes
- Additive neon bloom post pipeline plus a particle field for streaks/rings
- Vector font, title screen with mode cards, HUD, pause and game-over panels
- Register the game in the registry, scene dispatch, soundtrack and assets
- tools/verifyGeometryWars.js: headless checks incl. a bot soak across seeds
2026-10-04 19:56:07 -06:00
Brian Fertig 03d35b0b00 Overhaul boss encounters into distinct escalating profiles per level
- Replace flat kind/secondaryKind model with named BOSS_PROFILES that each carry their own move list, speed multiplier, and attack cooldown, so later fights are harder along every axis at once.
- Add six new attack patterns (ring, spread, spiral, aimed, wall, reinforce) dispatched via round-robin; bosses under half health can swap to a harder phase2Moves set.
- Surface the boss name in the WARNING banner and extend its display time.
- Extend verifyDefender.js with check 10: asserts HP/cooldown monotonicity, valid move names, dual-phase presence, and live-simulates each level's boss to confirm declared move ordering and phase-2 takeover.
2026-09-06 15:54:20 -06:00
Brian Fertig 79fb74d9b2 Add Defender arcade game with wireframe rendering and headless verificat
- Implement full Defender gameplay: boids swarmers, walkers, abductors, boss fights, humanoid rescue/escape state machine, combo multiplier, and overdrive timescale across 5 levels
- Render all entities as procedural Graphics strokes (glow-stroke pair) with a toroidal wraparound world, per-level accent palettes, CRT overlay, and a custom vector font for banners/title
- Register the game in the registry, scene dispatch, asset manifest, and soundtrack overrides so it appears alongside other arcade titles
- Add tools/verifyDefender.js covering wrap math, seam-adjacent boids, every rescue transition, overdrive thresholds, entity leak bounds, boss/level tally, spiral-of-death guard, determinism, and a Monte-Carlo bot soak
2026-09-06 15:14:42 -06:00
Brian Fertig 52eaff8b96 Add word-steered board generation and level-scaled special tiles to Book
- Introduce BookworkSteering with context-aware letter placement: class
  steering, vowel-band control, and a real-word completion boost so boards
  stay playable and avoid dead/vowel-clumped states across refills.
- Make gold/diamond spawn chances configurable per level via a linear ramp
  (specialTiles in bookwork.json), wiring the values through clearAndRefill
  and refillSteered instead of hard-coded constants.
- Add verifyBookwormBoard harness comparing baseline vs steered boards on
  word availability, dead-board rate, and simulated session survival, and
  extend verifyBookwork with special-tile schedule checks.
2026-09-01 23:09:12 -06:00
Brian Fertig 44de2fb049 Rename Bookwork to Bookworm and add dictionary-steered grid generation
- Update display name in registry, scene title, README, and tooling references
- Load ENABLE word list at runtime; fall back to unsteered random on failure
- Introduce makeSteeredGrid/refillSteering helpers for class/vowel-aware letter placement
- Export LETTER_WEIGHTS from BookworkLogic for reuse by the steering module
- Add `steer` tuning block (wordBoostK, classThreshold/damp/boost, vowelBand) to bookwork.json
2026-09-01 22:57:07 -06:00
Brian Fertig 97adfa642d Fix win-screen counter guard and add Playwright browser smoke test
- piecesBig counter guard used .parent (always undefined on container
  children in this Phaser build — they get .parentContainer), so the
  'PIECES' count-up never rendered; drop the dead guard.
- buttonHit() had the same .parent assumption; use .parentContainer.
- Add tools/smokeJigsaw.mjs: headless-Chromium smoke test driving
  menu -> play -> win showcase (camera settle, counter, confetti,
  frame/shine) -> Play Again -> Menu -> play again, asserting zero JS
  errors. Verified pass in browser.
2026-08-31 08:26:32 -06:00
Brian Fertig a7ebb67413 Extend jigsaw initial-image test coverage
Test now also asserts the menu is back to its original shape (no random-start button), the initial preview and thumb name match the random pick, Start Puzzle begins exactly that image, and the original 🎲 Random button still randomises the menu preview.
2026-08-30 21:19:11 -06:00
Brian Fertig 25f5e05a96 Start the jigsaw puzzle picker on a random image
The menu always opened on the first artwork; now imageIndex is randomised right after loadArtwork(), so each visit to the picker shows a different initial puzzle. The existing Random/prev/next buttons are unchanged (previous random-start button reverted in 4f2d299). Test page + CDP driver verify 8 fresh page loads all land on a valid in-range image with its preview loaded, with variety across loads.
2026-08-30 21:14:37 -06:00
Brian Fertig 4f2d29942d Revert "Add one-click random start to the jigsaw menu"
This reverts commit 0740c12ffa.
2026-08-30 21:12:44 -06:00
Brian Fertig 0740c12ffa Add one-click random start to the jigsaw menu
New '🎲 Start Random' button picks a random picture (never the current one when there's a choice) and starts the puzzle immediately, keeping the selected difficulty. Menu panel grows 820→890 to fit it. Headless-chromium test page + CDP driver verify: button placement, 8/8 random starts reach playing state, image variety, single-image guard, and difficulty preservation.
2026-08-30 21:11:15 -06:00
Brian Fertig 85fc7c16bf Add piece joining, board locking, and site soundtrack to jigsaw game
- Introduce group-based table assembly: grid-adjacent pieces snap together on the table, drag as one rigid unit, and lock onto the board as a block
- Extract join/lock rules into pure `resolveDrop` in JigsawLogic.js with a headless verification suite (tools/verifyJigsaw.js) covering fit guarantee, joining, locking, and win counting
- Replace the flat top-bar buttons with a "Menu ▾" dropdown panel to free the top-right corner for the shared site music HUD
- Integrate MusicPlayer soundtrack via getGameSoundtrack() and pin it to the fixed HUD camera
2026-08-30 19:49:00 -06:00
Brian Fertig ce14631544 Expand Master of Vega tutorial to cover full gameplay loop
- Add ~25 new steps: nearby stars, pan/zoom lesson, star info, fleet movement, home star/system view, colony management (allocation, focus), end turn, and the full Empire menu tour (Research, Diplomacy, Leaders, Colonies)
- Introduce hotspotAction, starPick, advanceOn modes (starPick/fleetInFlight/external), and advanceAction fields in tutorial data schema with validation
- Add VegaStarMap.fitToWorldBounds and extend pickFitZoomIndex to support a narrowed viewport area so the reachable-stars frame avoids the docked panel
- Bypass openModal gating for System View, Colony View, and Empire screens by calling their open functions directly from VegaTutorial; wire onClose/onColonyOpen callbacks to advance()
- Add tutorialFreePan flag so pan/zoom work during the free-pan step while all other map interactions stay frozen
- Add multi-target resolution (nearbyStars returns an array), invisible-shape holes, and per-star click hotspots in the tutorial overlay
- Update verification script to allow buttonless modal steps that advance via external callbacks
2026-08-29 11:11:25 -06:00
Brian Fertig 4175da2e26 Add guided tutorial to Master of Vega
- New data-driven script (data/mastervega-tutorial.json) with intro modal and three callout steps over the fleet marker and side-panel ship rows/count controls.
- Split into Phaser-free VegaTutorialData.js (schema validation, interpolation, target-id registry) and Phaser VegaTutorial.js (darken overlay, accent rings, callouts, hotspot, skip confirm, state machine).
- Tutorial auto-opens on every brand-new game and is re-triggerable from the menu when the starting fleet is still in orbit; malformed JSON disables the feature with a warning instead of crashing.
- Add D.tutorial depth (just below detail) so an invited ship-detail window layers above the overlay, and expose VegaSidePanel.tutorialRegion() for screen-space panel regions.
- Register the tutorial asset in the manifest and add verifier section 12 covering schema, targets, voice clips, placeholders, and interpolation.
2026-08-28 22:27:04 -06:00
Brian Fertig 58902075e5 Add Tents sound effects and intro jingle
- Add dedicated place, remove, win, and puzzle-start intro audio assets
- Register the new cues in the asset manifest and SFX key map
- Replace generic UI sounds with Tents-specific cues for placement, removal, and win
- Play the intro jingle on startGame, ducking the soundtrack until it completes
- Update smoke tests to assert the new jingles and cues fire
2026-08-28 21:09:04 -06:00
Brian Fertig af6ea98528 Add Tents & Trees logic puzzle game
- Implement full Tents & Trees scene (TentsGame.js) with day-to-night
  sky transition, campfire/ember/firefly effects, hover hints, violation
  feedback, and a win panel
- Add pure board model (TentsLogic.js) with backtracking solver,
  unique-solution puzzle generation across four difficulties, toggle/
  diagnose/solved helpers — all unit-testable in Node
- Register the game in gamesRegistry, main scene list, and slug dispatch
- Update game-icons.png with a new icon frame for Tents & Trees
- Add tools/verifyTents.js (solver + play-state unit tests and generation
  soak) and tools/smokeTents.js (Phaser-stub smoke test driving the full
  select → play → solve → win → restart flow)
2026-08-27 20:51:26 -06:00
Brian Fertig 199bbc40fb Fix Gin Rummy stale-index drag bug and add Pipe Puzzle unhover regressio
- Resolve hand card index from the container at event time instead of
  capturing it when handlers are bound, preventing the "wrong card on
  second drag" bug after a reorder.
- Enable drag-to-arrange in both draw and discard phases; clicking a card
  during draw now shows guidance rather than discarding.
- Add discard-pile click target so a selected card can be discarded by
  clicking the pile, and extract shared `_setupPileClick` helper to reduce
  duplication.
- Add `tools/regressionPipePuzzleUnhover.cjs`, a Playwright regression
  test verifying that Phaser's `killTweensOf(target, 'prop')` no longer
  clobbers in-flight rotation tweens on pointerout/pointerover.
2026-08-26 22:38:46 -06:00
Brian Fertig a4efa5b68a Simplify pipe puzzle to pure spanning-tree boards
- Remove extra-edge generation and cross pieces; board is now a single random spanning tree (one unique route between every pair of cells, no loops)
- Update leak rendering to place droplets on exact open edges using DELTA/EDGE and render water/flash layers above tiles in the container
- Adjust mini preview tiles and difficulty config (drop `extra` param)
- Rework tutorial to explain tree structure, scattered dead ends, and branch-by-branch solving strategy
- Update verification tool: assert tree edge count, no 4-way cells, leaf distribution across rows, faucet row variety, and board randomness; replace cross-based fixture with a valid tree
2026-08-24 22:14:08 -06:00
Brian Fertig d27244ac60 Rework Pipe Puzzle to branching network with no-leak win condition
Replace the single Hamiltonian-path model with a spanning-tree + extra-edges
approach that produces boards full of T-pieces, crosses and dead ends. The
win condition is now simply "zero leaks" — every socket matched to a
neighbour that opens back — instead of requiring one continuous path from
faucet to drain.

Key changes:
- Logic: generate puzzles via randomized Kruskal spanning tree plus tunable
  extra edges per difficulty; add bitCount, countLeaks, and derived
  angleFor/canonical rotation table
- Art: new tile textures for stub (dead end), T-piece, and cross;
  tileKeyFor and angleFor now handle all five piece types
- Game: faucet and drain are fixed anchors (not rotatable); removed the
  CONNECTED counter in favour of a simpler LEAKS stat; updated difficulty
  tiers (6×6 through 10×10) with extra-edge counts; improved water
  rendering contrast
- Tests: rewrite verify script for the new generation model (spanning tree,
  connectivity, piece mix, no-leak solution); update smoke test to skip
  anchor tiles
- Tutorial: updated rules, board reading guide, and tips for the branching
  network variant
2026-08-24 21:04:27 -06:00
Brian Fertig 518818dc1b Add Pipe Puzzle game with Hamiltonian path generation and procedural tile art 2026-08-24 19:42:16 -06:00
Brian Fertig 0940cd7255 feat(wolfenstein): add fists viewmodel, weapon cycling, ammo drops, and campaign carry-over
- Add fists weapon viewmodel with idle/hit animation states (220ms hit pose)
- Implement mouse-wheel weapon cycling that skips unowned weapons
- Add 33% chance for killed guards to drop ammo-clip pickups at death location
- Introduce campaign carry-over system preserving weapons/ammo/health between missions
- Fix stale 'attack' state clearing when enemies lose sight of player
- Extend save/load serialization to persist nextPickupId counter
- Update level-e1m1 with pistol pickup at spawn point
- Add comprehensive test coverage for all new features in verifyWolfenstein.js
2026-08-22 19:07:37 -06:00
Brian Fertig 5d8f51ae49 Bunch of edits 2026-08-22 17:50:40 -06:00
Brian Fertig eab08eede3 Add multiple weapons, pooled ammo, and pickup system to Wolfenstein
- Add shotgun, machine gun, gatling gun, and plasma rifle weapons with
  distinct fire modes (semi-auto, auto, burst) and damage profiles
- Refactor ammo from per-weapon pools to shared pools keyed by ammo type
  (9mm, shells, plasma), allowing multiple weapons to share the same pool
- Add pickup system with 11 item types: 5 weapons, 4 ammo variants, and
  2 health packs, all with spritesheet frames for rendering
- Update level editor with dynamic pickup dropdown populated from rules.json
- Generalize weapon viewmodel rendering to support multiple weapon images
  with per-weapon bob/sway animation
- Add cosmetic pickup animations: vertical bobbing and orbiting sparkle
  effects drawn in screen space around each pickup billboard
- Bump save version to v3 to invalidate old saves with incompatible ammo
  structure
- Update keyboard bindings for weapon switching (keys 1-6)
- Add comprehensive test coverage for new weapons, burst fire mechanics,
  ammo pooling, and pickup behavior
- Rename weapon_gattling.png to weapon_gatling.png to fix spelling
2026-08-22 14:13:03 -06:00
Brian Fertig a5b37038d2 Add object props (solid obstacles) to Wolfenstein E1M1
Introduces a new "Object" entity type that blocks movement but not sight/bullets, distinct from walls and pickups:

- **Data**: New `objects` array in level JSON (`{x, y, frame}`), with `data/wolfenstein-objects.json` as the frame registry (Tall Bush, Gold Eagle)
- **Artwork**: New `objects.png` spritesheet registered in `wolfenstein-artwork.json`; placeholder texture via `paintObject()` in WolfensteinArt.js
- **Logic**: Objects stored in `state.objects`, with a derived `map.objectBlocked` Set checked only by movement collision (`isWallCell`) — raycaster/sight/bullets never read it, so objects are see-through and shoot-through by construction
- **View**: Rendered as billboard sprites in `_drawSprites` with ground-anchored positioning (bottom edge on floor) and asymptotic depth sorting that stays below the weapon viewmodel
- **Editor**: New "Object" tool category with dynamic dropdown; click open floor to place/remove (toggle), click wall is a no-op; teal square indicator on board
- **Validation**: `validateLevel` checks objects sit on open floor; save/load round-trips with graceful degradation for pre-existing saves
- **Tests**: Verifies object blocks player movement but bullets pass through
2026-08-22 12:29:55 -06:00