Chess Extension for VS Code
Play chess directly in VS Code with an intelligent AI opponent, clickable move recommendations from chat, and smooth visual animations.
🎥 Demo
Chess Extension Demo
✨ Key Features
- Interactive Chess Board: Click-to-move gameplay with full rules validation
- Smart AI Opponent: Built-in chess engine with strategic evaluation
- Chat Integration: Get AI move recommendations via
@chess-master with clickable buttons
- Move Animations: Golden arrows trace move paths in all directions
- Game Management: Timer, move history, captured pieces, and new game functionality
- Smart Validation: Outdated move buttons automatically invalidated as game progresses
📦 Installation
From VS Code Marketplace
- Direct Install: Chess with AI
- Via VS Code:
- Open VS Code
- Go to Extensions (
Ctrl+Shift+X )
- Search for "Chess with AI" or "ekzhu.chess-extension"
- Click "Install"
- Command Line:
code --install-extension ekzhu.chess-extension
🚀 Quick Start
- Open Command Palette (
Ctrl+Shift+P )
- Run "Chess: Open Chess Board"
- Click pieces to move them
- Use
@chess-master suggest a move in chat for AI recommendations
💬 Chat Commands
Open VS Code chat panel and use:
@chess-master suggest a move
@chess-master what should I do?
@chess-master analyze this position
AI responses include clickable move buttons that apply moves directly to the board.
🎮 Features
Gameplay
- Click-to-move with visual highlighting
- Complete chess rules validation
- AI opponent with 1.5s thinking delay
- Game timer and move history with player labels
Visual Effects
- Golden animated arrows for all moves
- Square highlighting for source/destination
- 1-second smooth fade animations
- Multi-directional arrow support
Smart Protection
- Move buttons expire when game progresses
- Friendly warnings for outdated actions
- Automatic chat redirection for new suggestions
Requirements
- VS Code 1.100.0+
- Internet connection for chat features
Development
npm install
npm run compile
# Press F5 to launch Extension Development Host
Technical Stack
- Frontend: React with vanilla JavaScript
- Backend: TypeScript with chess.js
- Chat:
@vscode/chat-extension-utils
- Animations: CSS keyframes with coordinate calculation
Play chess with AI intelligence and modern animations - all in VS Code! 🏆
| |