Commit Graph
26 Commits
Author SHA1 Message Date
tiennm99 9ec6faabac fix: use Graphics instead of Line for correct path drawing
Phaser Line objects have origin (0.5, 0.5) which shifts the line
off-position. Switch to Graphics.strokePath() which draws at
absolute coordinates.
2026-04-04 16:09:15 +07:00
tiennm99 5c57a3f85f feat: always show connection path between selected cards
- Valid match: green path drawn along the actual route, visible for 400ms
  before cards are removed
- Invalid match: red line between the two cards with fade-in animation,
  visible for 500ms alongside shake feedback
- Path lines animate in with staggered fade (150ms per segment, 50ms delay)
- No longer requires debug mode to see connection paths
2026-04-04 15:50:15 +07:00
tiennm99 6489633784 docs: replace PDF with comprehensive game design document
Extract and expand game rules from pikachu.pdf into detailed markdown.
Covers board structure, all 4 matching patterns with ASCII diagrams,
card states, animation specs, symbol set, and technical architecture.
2026-04-04 15:25:54 +07:00
tiennm99 3bb6ed5d74 fix: regenerate package-lock.json for npm ci compatibility 2026-04-04 14:52:59 +07:00
tiennm99 214c305e83 ci: add GitHub Actions workflow to deploy to GitHub Pages
- Add deploy.yml: test → build → deploy pipeline
- Update next.config.mjs with basePath/assetPrefix for /pikachu/ subpath
- Uses actions/deploy-pages for GitHub Pages deployment
2026-04-04 14:42:00 +07:00
tiennm99 48a8aa29ae remove settings.local.json from version control 2026-04-04 14:28:05 +07:00
tiennm99 1b64ab7a7b fix: add text padding to prevent emoji glyph clipping 2026-04-04 14:25:33 +07:00
tiennm99 38d107a57a feat: add ?scene=game URL param to skip menu for debugging 2026-04-04 14:17:20 +07:00
tiennm99 45774cf563 fix: adjust card size and padding for better emoji display 2026-04-04 14:14:15 +07:00
tiennm99 b3fac84176 fix: enlarge cards to 55x55 so emojis display without cropping 2026-04-04 14:05:09 +07:00
tiennm99 e68038a157 fix: make cards square so emojis display fully without cropping 2026-04-04 14:00:35 +07:00
tiennm99 4b20343673 feat: use fun emojis as card faces
Replace card suit symbols with 24 fun emojis (faces, animals, objects)
for a more playful and visually distinct matching experience.
2026-04-04 13:55:09 +07:00
tiennm99 57bd599d90 feat: replace card images with emoji-styled cards, polish UI/UX
- Replace 52 card PNG assets with emoji-styled cards (suit symbols + values)
  rendered via Phaser containers (rectangle bg + text)
- Card interactions: hover (blue bg + scale), selection (green bg + pulse),
  match (white flash + scale up + fade), mismatch (red bg + shake)
- MainMenu: title entrance animation, button hover/press feedback,
  scene fade transitions, subtle title glow pulse
- Add moves counter tracking player progress
- Completion screen: dark overlay, animated congratulations, move stats,
  play again button
- Unified dark elegant theme (#16213e) across all scenes and CSS
- Clean up globals.css, remove unused styles
- Preloader: simplified without card asset loading
2026-04-04 13:52:03 +07:00
tiennm99 31e3fe6f93 refactor: DRY up game logic, remove dead code
- PikachuGameLogic.js: eliminate duplicated pattern methods (507→240 lines)
  - Remove non-WithPath variants, rename WithPath to findIPath/findLPath/etc
  - Replace redundant checkLineX/Y with isPathClear
  - New findPath() returns {valid, path, pattern} as single source of truth
  - Rename confusing U-pattern helpers with descriptive names
  - Fix testMove calling pattern methods twice redundantly
- PikachuGame.js: use new findPath API, remove dead changeScene method
- Delete empty unused Home.module.css, clean up index.jsx
- Simplify jest.config.js
2026-04-04 13:20:10 +07:00
tiennm99 007882962b update .gitignore with session-state and settings.local.json 2026-04-04 12:51:00 +07:00
tiennm99 ffd7577a65 fix: Z-pattern logic, eliminate code duplication, fix tests
- Fix Z-pattern to use proper 2-turn path (H-V-H and V-H-V scanning)
  instead of single midpoint which only duplicated L-pattern behavior
- Eliminate ~390 lines of duplicated pattern-matching code from
  PikachuGame.js by delegating to PikachuGameLogic via shared board ref
- Fix removeCards to reset type=0 so pattern matching works after removal
- Fix Jest config: remove invalid preset, add ESM support for Windows
- Rename log.js to log.cjs for CommonJS compatibility with ESM project
- Fix test expectations to account for pattern priority and border routing
2026-04-04 12:50:30 +07:00
tiennm99 73239c1e27 test: init tests 2025-07-17 14:16:06 +07:00
tiennm99 b0ebabb372 fix: logic 2025-07-17 13:36:27 +07:00
tiennm99 7f7ebe6753 feat: init claude, debug line 2025-07-17 13:28:01 +07:00
tiennm99 66d8b70ed1 feat: cleanup, fix U pattern 2025-07-16 23:45:26 +07:00
tiennm99 f9f3a9b355 feat: init simple rule 2025-07-16 23:19:12 +07:00
tiennm99 fb691216af Add credits section to README
Added a 'Credit' section to the README with links to the rule document and asset pack used in the project.
2025-07-16 23:13:05 +07:00
tiennm99 e80b412f02 feat: add assets 2025-07-16 23:11:19 +07:00
tiennm99 0b4614b99e feat: convert ts to js 2025-07-16 22:43:51 +07:00
tiennm99 db0a199940 chore: init 2025-07-16 22:30:16 +07:00
Tien Nguyen MinhandGitHub d1fbb908a9 Initial commit 2025-07-16 22:11:29 +07:00