~/tools/chess

Chess.js

Local engine, hot-seat, and online play — no servers. Full rules with castling, en passant, promotion; an alpha-beta engine with four strengths, eval bar, and hints.

What is this? Hide details

What is Chess?

A complete chess implementation that runs entirely in your browser. The rules engine covers castling, en passant, promotion, check/checkmate/stalemate, and draws (50-move, insufficient material, threefold repetition), with full SAN move notation. Play hot-seat on one device, against a built-in alpha-beta engine (four strengths from Beginner to Brutal, running in a Web Worker so the UI never freezes) with a live evaluation bar, candidate lines, and move hints — or online against a friend over an encrypted peer-to-peer connection using a share-code (our relay only brokers the connection; moves flow device-to-device). Drag or tap to move, scrub the move history, flip the board, undo, and resign. No accounts, no analytics, works offline.

chess.js

Controls

touch / mouse in use

  • tap a piece, then a highlighted square
  • or drag it straight to the square
  • tap a move in the list to review it

keyboard in use

  • move the square cursor
  • SPACEselect a piece, then confirm the move
  • ESCcancel the selection
  • step through the move history
  • Fflip the board
  • Hshow a hint
  • Rresign the game

controller in use

  • D-PADmove the square cursor
  • Aselect a piece, then confirm the move
  • Bcancel the selection
  • Xflip the board
  • Yshow a hint
  • LBRBstep through the move history
  • STARTopen these controls
engine
0.00
depth
nodes
nps
time
skill
game
connect (p2p)
offline