Commit Graph

25 Commits

Author SHA1 Message Date
tiennm99 877a33fc00 feat(01-03): add Game class orchestrator with TDD
- Create Game class that orchestrates canvas, game loop, and events
- Game constructor initializes canvas, context, loop, and events
- Game.start() starts the loop and emits 'game:start' event
- Game.render() clears canvas with background color
- Handle device pixel ratio for sharp rendering
- Add comprehensive tests (15 tests) for Game class

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 23:58:18 +07:00
tiennm99 1ab926cbc8 docs(01-02): complete core infrastructure plan
- SUMMARY.md created with full execution details
- STATE.md updated: plan 2 of 3, 11% progress
- ROADMAP.md updated: 01-02 marked complete
- All 79 tests passing, TypeScript compiles clean

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 23:54:29 +07:00
tiennm99 99a0b56657 refactor(01-02): fix TypeScript type issues in tests
- Changed EventEmitter generic constraint to `object` for interface compatibility
- Fixed GameLoop test closure variable narrowing issue by using array

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 23:51:35 +07:00
tiennm99 f74eb98087 feat(01-02): implement Tile model class
- Implements Tile interface from types/index.ts
- Constructor with id, type, position
- emoji getter returns CONFIG.emojis[type]
- isAdjacent() checks orthogonal adjacency
- cleared property defaults to false

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 23:49:16 +07:00
tiennm99 21fe45ce8c test(01-02): add failing tests for Tile model class
- Tests for constructor with id, type, position
- Tests for emoji getter returning correct emoji
- Tests for isAdjacent() method with various positions
- Tests for readonly properties and cleared default

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 23:48:48 +07:00
tiennm99 86e0d2e7a0 feat(01-02): implement TypedEventEmitter class
- Generic class wrapping Node's EventEmitter
- Type-safe on(), emit(), off() methods
- Added once() and removeAllListeners() methods
- Returns this for method chaining

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 23:47:55 +07:00
tiennm99 2c2d422142 test(01-02): add failing tests for TypedEventEmitter class
- Tests for on(), emit(), off() methods
- Tests for multiple listeners and chaining
- Tests for type safety with typed payloads
- Tests for error handling and once() method
- Tests for removeAllListeners()

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 23:47:24 +07:00
tiennm99 ca2f5406bf test(01-02): add failing tests for GameLoop class
- Tests for start(), stop(), isRunning(), getRafId()
- Tests for update callback with deltaTime
- Tests for delta time accumulation
- Tests for loop lifecycle (start/stop multiple times)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 23:46:34 +07:00
tiennm99 e67965796f docs(01-01): complete project scaffolding plan
- Add SUMMARY.md with execution details
- Update STATE.md with progress and decisions
- Update ROADMAP.md with plan completion
- Mark CORE-01 as complete in REQUIREMENTS.md

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 23:43:56 +07:00
tiennm99 89a09fc047 feat(01-01): create shared type definitions
- Add src/types/index.ts with type definitions
- Define TilePosition interface (row, col)
- Define Tile interface (id, type, position, cleared)
- Define GameEvents interface for type-safe event handling
- Add comprehensive tests for all type definitions

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 23:40:44 +07:00
tiennm99 ed04c66cd1 feat(01-01): create game configuration constants
- Add src/config.ts with CONFIG object
- Define grid settings (10 rows, 16 cols, 160 tiles)
- Define tile settings (size, gap, corner radius)
- Define 16 nature-themed emojis
- Define color palette for game elements
- Add comprehensive tests for all config values

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 23:39:15 +07:00
tiennm99 02fcbd8da4 feat(01-01): create Vite project with TypeScript and Canvas
- Initialize Vite project with vanilla-ts configuration
- Add TypeScript with strict mode enabled
- Configure Vitest for testing
- Create index.html with Canvas element
- Add main.ts entry point with canvas setup
- Add setup tests for project dependencies

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 23:38:14 +07:00
tiennm99 070cad9dc0 docs(01): create Phase 1 Core Foundation plans 2026-03-10 23:31:02 +07:00
tiennm99 d7ad988ced docs(01): add research and validation strategy 2026-03-10 23:23:07 +07:00
tiennm99 522d06848a docs(01-core-foundation): add phase research document 2026-03-10 23:21:54 +07:00
tiennm99 9d7ddc5cf1 docs(state): record phase 1 context session 2026-03-10 23:15:01 +07:00
tiennm99 b87660ad67 docs(01): capture phase context 2026-03-10 23:14:46 +07:00
tiennm99 973c1ba7b6 docs: create roadmap (6 phases) 2026-03-10 23:04:58 +07:00
tiennm99 cb944a0b4d docs: define v1 requirements 2026-03-10 22:58:47 +07:00
tiennm99 07b6b5664b docs: complete project research for Pikachu Match tile-matching game
- STACK.md: Recommended Vite + TypeScript + Canvas minimal approach
- FEATURES.md: Core matching mechanics and table stakes features
- ARCHITECTURE.md: Layered architecture with state machine pattern
- PITFALLS.md: Critical pitfalls (path-finding, board generation, dead-end detection)
- SUMMARY.md: Synthesized findings with 6-phase roadmap suggestions

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 22:56:01 +07:00
tiennm99 c68c881db7 chore: add project config 2026-03-10 22:33:08 +07:00
tiennm99 6f0f29d1b7 docs: initialize project 2026-03-10 22:28:35 +07:00
tiennm99 eb9b71f9d7 chore: install GSD (get-shit-done) Claude Code integration
Add GSD framework configuration including agents, commands, hooks,
and settings for spec-driven development workflow.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 22:16:07 +07:00
tiennm99 c195182a0d docs(gsd-module): add GSD Module 3 course structure and lesson content
- Expand README with full setup instructions, file structure, and testing notes
- Add lesson modules for 3.1–3.5 covering What is GSD through Verify & Beyond
- Add course-structure.json, PROJECT_BRIEF.md, and .claude/ commands

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-08 21:13:56 +07:00
Tien Nguyen Minh ce440cdd66 Initial commit 2026-03-08 21:11:57 +07:00