A web-based chess program written in React and React-dnd that supports any combination of player vs AI. Includes support for drag and drop for human players and animation effects for computer players.
See it running at https://muhammadhamza.dev/projects/chess.
Prereqs:
- Node.js and gulp on a linux server
npm install -g gulp
to install gulp if you already have Node.js- A web server (like Apache).
Installation steps:
git clone <clone url>
cd chess/
npm install
- this will install required packages as specified in package.json- Modify
movesUrl
in app.properties as needed gulp build
- this will build all required files to thebuild/
directory
Test it:
- Open
build/index.html
in a browser. - For testing purposes, if you don't have a web server, running
python -m SimpleHTTPServer
in thebuild/
directory and navigating to http://localhost:8000 should do the trick. - You should see several buttons asking what kind of chess game to play.
- To troubleshoot, look for javascript errors in the browser console.