Skip to content

Add FEN support, DebugPanel, and improve piece color contrast#82

Open
deckhand-agent wants to merge 6 commits into
walshb421:mainfrom
deckhand-agent:better-piece-colors
Open

Add FEN support, DebugPanel, and improve piece color contrast#82
deckhand-agent wants to merge 6 commits into
walshb421:mainfrom
deckhand-agent:better-piece-colors

Conversation

@deckhand-agent
Copy link
Copy Markdown
Collaborator

Summary

  • FEN support: Added full FEN string parsing/generation to both the Python engine (engine/board.py) and the Vue frontend (src/composables/chess.js, src/components/ChessBoard.vue), allowing board positions to be loaded from and exported as FEN notation
  • Test fixtures: Added engine/fixtures.py with a library of FEN positions organized by category (openings, endgames, special moves, etc.) for testing and debugging
  • DebugPanel component: Added src/components/DebugPanel.vue integrated into App.vue, providing a UI for loading FEN positions, browsing fixture categories, and inspecting board state during development
  • Piece color contrast: Improved visual distinction between light and dark team pieces via src/assets/base.css

Test plan

  • Load the app and verify default starting position renders correctly
  • Open DebugPanel and load a FEN string — confirm board updates to the correct position
  • Browse fixture categories and load several positions — verify pieces are placed correctly
  • Check that light and dark pieces are visually distinct with the new color scheme
  • Confirm FEN export from the engine matches expected output for known positions

🤖 Generated with Claude Code

MCP Agent and others added 6 commits January 11, 2026 01:28
Add engine/fixtures.py with predefined chess positions for testing:
- Basic positions (starting, empty)
- Checkmate scenarios
- Special moves (en passant, castling)
- Check scenarios
- Pawn promotion positions
- Stalemate and endgame positions
- Add load_fen() method to parse FEN strings and set board state
- Add to_fen() method to export current position as FEN
- Add WebSocket callbacks for load_fen, load_fixture, get_fixtures
- Track en_passant_target for FEN compatibility
- Include turn and FEN in game state JSON
- Update en passant logic to work with FEN-loaded positions
- Convert indentation from tabs to spaces
- Add loadFen() to load arbitrary FEN positions
- Add loadFixture() to load named test fixtures
- Add getFixtures() to request fixture list from server
- Add reactive refs for turn, currentFen, and fixtures
- Update data watcher to handle new state fields
- Display current game state (turn, player, move number)
- Show current FEN with copy-to-clipboard button
- FEN input field to load arbitrary positions
- Dropdown with categorized test fixtures
- Reset board button
- Dark theme styling to match app
- Add DebugPanel component with toggle visibility
- Press D key to show/hide debug panel
- Add sidebar layout for debug panel
- Ignore keypress when typing in input fields
Change light pieces from blue-gray (#8398B9) to warm amber (#E8C87A)
and darken dark pieces to a deeper navy (#1E3A5F), making the two
teams clearly distinguishable at a glance.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant