Regal Chess is a full-featured chess game with a polished browser UI, built-in computer opponent, and online multiplayer rooms over WebSockets.
- Complete chess rules and legality:
- All standard pieces and legal move generation
- Check, checkmate, stalemate
- Castling, en passant, and promotion
- Draw detection (threefold repetition, 50-move rule, insufficient material)
- Premium board interface:
- Responsive animated board
- Legal move and capture highlights
- Last move and in-check indicators
- Move history and captured pieces with material edge
- Board flip and undo controls
- Play modes:
- Local two-player (same device)
- Vs Computer (minimax AI, Easy/Medium/Hard)
- Online multiplayer rooms (player or spectator)
- Time controls:
- Untimed, 3|2, 5|0, 10|5, 15|10
- Clock mode is disabled in online multiplayer (server-authoritative state)
index.html- app layout and controlsstyles.css- visual design and responsive stylingengine-core.js- shared chess engine (used by browser + server)app.js- frontend game controller (UI, AI, online client)server.js- static + WebSocket server for online multiplayerpackage.json- Node scripts and dependencies
- Install dependencies:
npm install
- Start the server:
npm start
- Open: http://localhost:3000
- Set
Game ModetoVs Computer. - Pick
AI DifficultyandPlay Ascolor. - Press
New Game.
- Set
Game ModetoOnline Multiplayer. - Enter a
Room Code(or leave empty to auto-generate one). - Choose
Preferred Color(or auto assign). - Press
Connect. - Share the same room code with another player connected to the same server.
Notes:
- First two clients become White and Black players.
- Additional clients join as spectators.
Request New Gameresets board state for everyone in the room.
- The server validates online moves using the same engine as the frontend.
- Undo is intentionally disabled in online mode to keep room state consistent.