Skip to content

Latest commit

 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chess

Play chess in the browser — full official rules, clocks, and a shareable link for two players. No install.

Play here: https://dobrosketchkun.github.io/chess/

Chess game screenshot

How to play

Same device (hotseat)

  1. Open the site.
  2. Pick a time control (No timer, 5+0, 10+0, or 15+10).
  3. Click Hotseat.
  4. Take turns on the same board. Use Undo if you need it.

Two devices (online)

  1. Player 1 opens the site, picks a time control, and clicks Create invite.
  2. Copy the invite link and send it to your opponent (keep Player 1’s tab open).
  3. Player 2 opens that link — they join as Black; Player 1 is White.
  4. Click a piece to see legal moves (dots / rings), then click a highlighted square to move.
  5. When a pawn reaches the last rank, choose what to promote to.

Important: Player 1 must leave their browser tab open for the whole game. Closing or refreshing it ends the connection. For a new match, create a new invite.

Features

  • Full chess rules: castling, en passant, promotion, check, checkmate, stalemate
  • Draws: claim threefold repetition or fifty-move; automatic draws for stalemate / insufficient material
  • Clocks with flag (timeout), or No timer for untimed games
  • Resign, rematch, and match score
  • Works on phones and desktops

Troubleshooting

Problem What to try
Guest never connects Host tab still open? Link copied fully? Both on HTTPS (GitHub Pages is fine). Wait a few seconds for matchmaking.
Stuck on VPN / school network Try another network or turn VPN off.
Can’t move Wait for your turn / “Connected”. Only your color is clickable online.
Old invite links Create a new invite after updating the site — old PeerJS-style links no longer apply.

Deploy your own copy

  1. Fork or upload this repo to GitHub.
  2. Settings → Pages → Deploy from branch main, folder / (root).
  3. After a minute, open https://YOUR_USERNAME.github.io/YOUR_REPO/.
  4. Put that URL in the Play here line at the top of this README.

About

Play chess with a friend

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages