Commit Graph

19 Commits

Author SHA1 Message Date
Brian Fertig 762792f9f5 feat: add Katamino single-player pentomino puzzle game
Implement Katamino, a 5×N grid tiling puzzle using the 12 standard
pentominoes. Players select a grid width (3-12) and solve puzzles by
placing all chosen pieces to fill the board.

Key features:
- Three-screen flow: penta select → set select → play
- Scrollable puzzle card grid with completion progress tracking
- Piece rotation (R), flip (F), and lift-to-reposition
- Pre-generated puzzle bank (katamino.json) with all valid tilings
- Offline generator script (genKatamino.js) using backtracking solver
- Progress saved to localStorage per puzzle
- Registration in server registry and scene dispatchers
2026-06-20 08:26:23 -06:00
Brian Fertig ae30299838 feat: add Risk board game with AI opponents
Implement the classic Risk board game with full game logic, AI players
with adjustable skill levels (1-5), and Phaser-based rendering.

New files:
- RiskData.js: map data, adjacency graph, continent bonuses, card deck
- RiskLogic.js: pure game engine (reinforce, attack, fortify phases)
- RiskAI.js: heuristic AI with 5 skill tiers and configurable behavior
- RiskGame.js: Phaser scene with combat animations and UI
- tutorial.md: in-game tutorial ("A Field Manual by General Ironside")
- verifyRisk.js: headless fixture and self-play verification script

Integrates with existing game framework via registry, game room dispatch,
and preload scene. Includes board image and updated pawn sprites.
2026-06-17 20:30:14 -06:00
Brian Fertig 8a79b6909d feat: add Gin Rummy card game with AI opponents
Implement a fully playable Gin Rummy game with Phaser-based UI,
pure logic engine, and heuristic AI (skill levels 1-5).

Features:
- Complete Gin Rummy rules: draw, discard, knock, gin, layoff, scoring
- Meld detection with optimal deadwood minimization
- 2-4 player support with AI opponents
- Drag-to-reorder hand, visual meld highlights, turn indicators
- Round and game-over overlays with score tracking
- Headless verification script with unit tests and self-play simulation

Files added:
- public/src/games/ginrummy/GinRummyData.js (card helpers, layout, constants)
- public/src/games/ginrummy/GinRummyLogic.js (deterministic game engine)
- public/src/games/ginrummy/GinRummyAI.js (AI decision making)
- public/src/games/ginrummy/GinRummyGame.js (Phaser scene)
- server/scripts/verifyGinRummy.js (headless test harness)

Also updates game-icons/opponents assets and registers the game
in the server registry and game room scene dispatcher.
2026-06-14 20:51:15 -06:00
Brian Fertig f2da9bfb20 fix: correct container hitbox double-shift in Canasta & Cribbage
Fix hitbox misalignment where Phaser's Container displayOrigin already
centers bounds, causing manual Rectangle offsets to double-shift.

feat: add Rummikub game with AI, immutable engine, and solver

- Implement full Rummikub gameplay: drag & drop, sets/runs, jokers,
  table manipulation, opening meld rule, and scoring
- Add immutable game engine (RummikubLogic) following existing patterns
- Add rules solver (RummikubSolver) for set validation and AI planning
- Implement 5-level heuristic AI (RummikubAI) with configurable delay
- Register game in registry and routing, include tutorial markdown
- Add headless verification script (fixture tests + AI self-play)
2026-06-14 16:23:44 -06:00
Brian Fertig 2b224ff62b feat(jewelquest): spell chaining and combat animations
- Allow spell chaining within a turn (Puzzle Quest rule): casting a spell
  no longer ends your turn, enabling multiple casts per turn followed by a
  gem swap to pass play.
- Add procedural spell-icon textures (shield, swords, bolt, flame, meteor,
  thorn, poison, dagger, banner, leaf) for visual spell feedback.
- Implement combat animations: skull-match convergence strike, spell damage
  fly-in, spell heal burst with particle ring, HP bar flash, and floating
  damage/heal numbers.
- Refactor HP and mana updates into separate `updateHpBar` and `updateManaBar`
  methods so mana reacts immediately while HP drains at animation climax.
- Defer stun application until the caster's turn actually ends.
- Update tutorial and verification tests to match the new turn-passing rules.
2026-06-14 05:18:45 -06:00
Brian Fertig 59ee3eca0c feat: add Dot Link puzzle game
Introduce Dot Link, a Flow-Free-style single-player puzzle game where players connect matching colored dots to fill the grid. Includes:
- Pure JS puzzle engine with deterministic board generation, DFS solver, and win validation (`DotLinkLogic.js`)
- Phaser 3 UI scene featuring a cyberpunk/synthwave theme, level select, daily runs, hint system, and smooth path-drawing mechanics
- Deterministic bank of 100 hand-tuned puzzles (`dotlink.json`)
- Node scripts for puzzle generation and verification
- Full integration into the app's preload, routing, and game registry
2026-06-14 05:18:03 -06:00
Brian Fertig f5b0c545f4 feat: add Cribbage and Canasta single-player card games
- Implement full game logic, scoring, and UI scenes for Cribbage and Canasta
- Add heuristic AI opponents with 5 skill levels and reaction delays for both games
- Cribbage: race-to-121 track, pegging, crib scoring, and cut mechanics
- Canasta: 108-card shoe, partnership melding, canastas, frozen/blocked piles, and go-out rules
- Include headless verification scripts (fixture + self-play tests) for both games
- Register new games in server registry and update scene routing
- Add tutorial markdown files and update game icon assets
2026-06-13 21:54:20 -06:00
Brian Fertig 09d94a6ae7 Added Slot Machines 2026-06-12 19:42:27 -06:00
Brian Fertig 3cd0f2b2e7 feat: add Bejeweled Blitz and Mini Motorways games
- Implement Phaser scenes and pure JS logic modules for both games
- Register games in server registry and scene routing
- Add headless verification scripts for Bejeweled and Mini Motorways logic
- Update game-icons sprite sheet
2026-06-12 13:52:27 -06:00
Brian Fertig c9192cda75 feat(puddingmonsters): implement open-edge sliding mechanic
Make board edges open instead of walled — blobs that slide off the
table fall and die, faithful to the original Pudding Monsters.

- Detect edge deaths in computeSlide (deathCause: 'edge')
- Animate blobs tumbling off the board with overshoot + fade
- Show 'Overboard!' death overlay for edge falls vs 'Splat!' for spikes
- Redesign board as a floating table with open edges (drop shadow, no rim)
- Regenerate all levels with walls added to every tier (walls are the
  only terrain that stops a slide, so they're required from tier 1)
- Update UI copy to explain the new slide-and-fall rules
2026-06-12 00:52:36 -06:00
Brian Fertig d51d026352 feat: add Zuma marble-shooter game with 20 levels
Implement a complete Zuma-style puzzle game featuring:

- Pure game engine (`ZumaLogic.js`) with Catmull-Rom path animation,
  segment-based chain physics, match-3 popping, and power-ups (slow,
  reverse, accuracy, explosion)
- Phaser scene (`ZumaGame.js`) with procedural textures, laser sight,
  and full UI (level select, overlays, scoring)
- 20 hand-designed levels across 6 path shapes (s-curve, horseshoe,
  spiral, zigzag, double-loop, figure-eight) with calibrated difficulty
- Level generator (`genZuma.js`) and verification suite (`verifyZuma.js`)
  for path geometry, parameter ranges, and engine correctness
- Platform integration: game registry, scene dispatch, preload asset
2026-06-12 00:15:51 -06:00
Brian Fertig d01a2917b1 feat: add Jewel Quest game and fix Portrait memory leaks
- Register new Jewel Quest game across client and server
- Update game icons spritesheet with new frame (59)
- Fix memory leaks in Portrait components by implementing proper
  cleanup with double-destruction guards and returning destroy function
2026-06-11 19:07:43 -06:00
Brian Fertig bbb9c329c7 feat: add 4-player Hong Kong style Mahjong with AI opponents
- Implement pure logic engine for tile management, shanten calculation, claim resolution, and faan scoring.
- Add heuristic AI (5 skill levels) using shanten minimization, ukeire tiebreaking, and adaptive defense.
- Build Phaser UI with tile rendering, dynamic scoreboard, claim prompts, hand-end modals, and a scoring reference panel.
- Integrate into frontend routing, opponent selection, and backend registry.
- Include headless verification script for tile catalog, scoring fixtures, and AI self-play invariant checks.
- Update game icon assets and add in-game tutorial.
2026-06-11 18:18:45 -06:00
Brian Fertig dd749bc570 feat: add Mahjong Match solitaire game with 6 layouts and guaranteed-solvable deals
- Add complete Mahjong Match game (MahjongLogic.js + MahjongMatchGame.js) with pure board model and Phaser UI
- Implement 6 layouts: Garden, Crossroads, Pyramid, Butterfly, Fortress, and classic Turtle (up to 144 tiles)
- Generate guaranteed-solvable deals by simulating reverse removal of free pairs
- Add tile matching logic using half-tile coordinate system for proper layer overlap detection
- Include 38 tile face images (bamboo, circle, pinyin characters, winds, dragons, flowers, seasons)
- Add hint system, shuffle functionality, timer, best time tracking per layout
- Register game in server registry and scene dispatch tables
- Add headless verification script for face set validation and random self-play testing
2026-06-11 16:23:17 -06:00
Brian Fertig bf47c50dfa Added Block Fighter game 2026-06-11 10:03:22 -06:00
Brian Fertig 85f0079b2c feat: overhaul Pudding Monsters scoring and add opponent videos
- Replace star collection with target-square coverage for Pudding Monsters
- New 3-star medal system: min(targets covered, par-based efficiency)
- Add "Reset Progress" buttons to Pudding Monsters and Rush Hour level select
- Add reset API endpoint for puzzle progress
- Add Beth and Blackwind opponents with idle/happy/upset animations
- Update puddingmonsters.json levels with target squares instead of stars
2026-06-08 22:24:12 -06:00
Brian Fertig ea44758f7d feat: add Jell-o Monsters (Pudding Monsters) slide-and-merge puzzle game
Introduce a new single-player logic puzzle game where players flick jelly
blobs across a grid to slide and merge them into a single monster.

- PuddingMonstersLogic.js: pure slide-and-merge model with BFS solver,
  no Phaser/DOM dependencies; shared by client and generator
- PuddingMonstersGame.js: Phaser scene with drag-to-flick, arrow keys,
  undo/reset/hint, par tracking, star collection, death on spikes
- genPuddingMonsters.js: offline level generator using seeded RNG and
  BFS solver; produces 40 levels across 5 difficulty tiers
- puddingmonsters.json: generated level data (40 levels, 5–7 grid sizes)
- Update main.js, GameRoomScene.js, PreloadScene.js, registry.js to
  wire the new game into the app
- Update game-icons assets
2026-06-08 21:58:28 -06:00
Brian Fertig 3d3d09a9fb feat: add Rush Hour puzzle game with logic category
- Register Rush Hour game in server registry (logic category, single-player)
- Add "Logic & Puzzle" tab to game menu
- Integrate RushHourGame scene in client-side main.js and GameRoomScene
- Load rushhour.json game data in PreloadScene
- Add puzzle API routes for server-side puzzle management
- Configure tab icon frame for new logic category
2026-06-08 17:57:24 -06:00
Brian Fertig 9cb05f5f44 Crossword Changes and added Tectonic 2026-06-05 23:24:11 -06:00