|Stefan Deleanu 9266b6edaa||3 months ago|
|build||2 years ago|
|src||2 years ago|
|LICENSE||3 months ago|
|README.md||3 months ago|
|chess.css||7 years ago|
|chess.html||3 months ago|
|chess.ico||7 years ago|
|chess.min.js||2 years ago|
Try it out here. Usage is shown below the chessboard. At least Internet Explorer (8 or later), Chrome and Firefox should work.
Source files are placed in the
src directory. Minification and linting files are placed in the
build directory. Source file contents:
chess.js: Constants, utilities and the Chess namespace.
bitboard.js: 64-bit bit twiddling tools.
zobrist.js: Game state hash calculator. Currently only used for the threefold repetition rule, but will be used in the transposition table implementation.
move.js: Piece movement representation.
position.js: Chess game state and mutation.
parser.js: Parser for various Chess notations.
ai.js: Artificial intelligence, i.e. computer opponent. Basic alpha-beta pruned minimax with a simple evaluation function.
ui.js: User interface code.
chess.include.js: Includes all of the above files.
chess.css: User interface style.
chess.html: Main game file.
test.js: Automated tests.
test.html: Automated test runner.
To compile the minified version using
compile.sh in the
build directory, you need bash and the Closure compiler. You may need to adjust the
.jar location in
compile.sh. Compiled files are placed in the top-level directory.
To lint using
To run the tests, open
test.html in the
The Chess implementation is distributed under the MIT license. See accompanying LICENSE file for details.
Third-party components are distributed/used under their respective license: