BROWSER GAME · COMPUTER PLAY

CHESS GAME

A responsive chess interface for pass-and-play or five-level computer matches with clear move feedback and post-game review.

React · Vite · chess.js · Stockfish.js

Active Chess Game position against the computer
Chess Game mode, color, and five-level difficulty setup

PROJECT SNAPSHOT

Rules-aware play and approachable browser computer matches

Type
Responsive browser game
Status
Public GitHub Pages demo
Technologies
React, Vite, chess.js, Stockfish.js
  • Local player-versus-player and computer modes
  • Five computer levels and color selection
  • Legal-target, capture, last-move, and check highlights
  • Elapsed clocks and common game controls
  • Checkmate/draw results and review-board mode

Technical details

chess.js validates legal moves, checks, castling, en passant, promotion, and game results. A browser-safe asm.js Stockfish build runs in a classic Web Worker, avoiding the cross-origin-isolation requirement of multithreaded WebAssembly engines.

Verification & limitations

Lint and production build checks passed locally. If the engine cannot load or answer, computer mode chooses a random legal move while local two-player play remains available; that fallback is not equivalent to Stockfish analysis.

Computer strength is capped for browser responsiveness. Clocks record elapsed time but do not enforce time controls. Online multiplayer, saved games, PGN import/export, sound, and drag-and-drop are not implemented.