Merge pull request #9 from devp/claude/plan-mecha-duel-r3iyb feat: implement mecha duel#10
Closed
devp wants to merge 8 commits intoclaude/implement-tak-game-QjxhGfrom
Closed
Merge pull request #9 from devp/claude/plan-mecha-duel-r3iyb
feat: implement mecha duel#10devp wants to merge 8 commits intoclaude/implement-tak-game-QjxhGfrom
devp wants to merge 8 commits intoclaude/implement-tak-game-QjxhGfrom
Conversation
- Define Position, PieceType, PieceState, Piece, CommittedPiece types - Define MechaDuelState interface - Add position helpers: posToIndex, indexToPos, isValidPos, posEquals - Add constants for board size, directions, knight jumps - Add createInitialPieces helper - Create stub game definition https://claude.ai/code/session_01G2NbWZYWsFUY3KPhwErBwc
- Create scenarios.ts with modular scenario system - Add simple scenario with symmetric pawn placement - Add createInitialBoard helper to initialize board from scenario - Update game setup to use scenario-based initialization - Kings placed at (4,0) and (4,7), pawns at corners of center https://claude.ai/code/session_01G2NbWZYWsFUY3KPhwErBwc
Tests written before implementation for: - Position helpers (passing) - Board setup (passing) - Commit validation: isValidBishopTarget, isValidRookTarget, etc. - Strike resolution: raycast, resolveStrike - Knight resolution: isValidKnightJump, resolveKnight - KingStep resolution: isValidKingStep, resolveKingStep - Piece state transitions: transitionPieceState, refreshPieces - Win conditions: checkWinCondition 31 tests pass, 45 fail (pending implementation) https://claude.ai/code/session_01G2NbWZYWsFUY3KPhwErBwc
Phase 3 - Game Moves: - Add commit validation: isValidBishopTarget, isValidRookTarget, isValidKnightTarget, isValidQueenTarget - Add raycast and resolveStrike for strike attacks - Add isValidKnightJump and resolveKnight for knight movement - Add isValidKingStep and resolveKingStep for king movement - Add piece state transitions: transitionPieceState, refreshPieces - Implement all four moves: commit, execute, kingStep, pass Phase 4 - Win Conditions: - Add checkWinCondition function - Add endIf to game definition All 76 tests now passing. https://claude.ai/code/session_01G2NbWZYWsFUY3KPhwErBwc
- Create Board.tsx with full game UI: - 8x8 grid display with Kings, Pawns, committed pieces - Action buttons: Commit, Execute, KingStep, Pass - Piece selection for committing - Multi-select for executing committed pieces - Valid move highlighting - Piece supply display (ready/committed/exhausted) - Create index.ts with game and Board exports https://claude.ai/code/session_01G2NbWZYWsFUY3KPhwErBwc
Add ai.enumerate function that enumerates all legal moves: - All valid Commit moves (piece type × valid target squares) - All Execute combinations (non-empty subsets of committed pieces) - All valid KingStep moves (8 directions when valid) - Pass (always valid) Compatible with MCTSBot for AI play. https://claude.ai/code/session_01G2NbWZYWsFUY3KPhwErBwc
- Add MechaDuel to registry.ts with game definition - Fix unused variable/import warnings: - Remove unused imports from Board.tsx - Remove unused boardStyle variable - Prefix unused piece parameter with underscore - Remove unused BOARD_SIZE from test imports All 103 tests passing, build successful. https://claude.ai/code/session_01G2NbWZYWsFUY3KPhwErBwc
feat: implement mecha duel
✅ Deploy Preview for devp-fgj-js ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.