{"id":29922305,"url":"https://github.com/kbjorklu/chess","last_synced_at":"2025-08-02T08:46:33.843Z","repository":{"id":10096888,"uuid":"12158508","full_name":"kbjorklu/chess","owner":"kbjorklu","description":"JavaScript Chess","archived":false,"fork":false,"pushed_at":"2019-10-03T00:55:51.000Z","size":102,"stargazers_count":83,"open_issues_count":0,"forks_count":50,"subscribers_count":11,"default_branch":"master","last_synced_at":"2023-08-03T04:04:19.850Z","etag":null,"topics":["chess","game","html5-game","javascript","minimax"],"latest_commit_sha":null,"homepage":"http://www.iki.fi/kbjorklu/chess/","language":"JavaScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kbjorklu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-08-16T12:40:52.000Z","updated_at":"2023-06-13T06:07:30.000Z","dependencies_parsed_at":"2022-09-14T16:40:15.327Z","dependency_job_id":null,"html_url":"https://github.com/kbjorklu/chess","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"purl":"pkg:github/kbjorklu/chess","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kbjorklu%2Fchess","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kbjorklu%2Fchess/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kbjorklu%2Fchess/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kbjorklu%2Fchess/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kbjorklu","download_url":"https://codeload.github.com/kbjorklu/chess/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kbjorklu%2Fchess/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268356088,"owners_count":24237380,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chess","game","html5-game","javascript","minimax"],"created_at":"2025-08-02T08:46:05.048Z","updated_at":"2025-08-02T08:46:33.784Z","avatar_url":"https://github.com/kbjorklu.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JavaScript Chess\n\nThis program is a JavaScript implementation of the board game [Chess](http://en.wikipedia.org/wiki/Chess), with a computer player opponent. All move types are supported, including en passant, castling and promotion.\n\nTry it out [here](http://www.iki.fi/kbjorklu/chess/). Usage is shown below the chessboard. At least Internet Explorer (8 or later), Chrome and Firefox should work.\n\n# Code Structure\n\nSource files are placed in the `src` directory. Minification and linting files are placed in the `build` directory. Source file contents:\n\n* `chess.js`: Constants, utilities and the Chess namespace.\n* `bitboard.js`: 64-bit bit twiddling tools.\n* `zobrist.js`: Game state hash calculator. Currently only used for the threefold repetition rule, but will be used in the transposition table implementation.\n* `move.js`: Piece movement representation.\n* `position.js`: Chess game state and mutation.\n* `parser.js`: Parser for various Chess notations.\n* `ai.js`: Artificial intelligence, i.e. computer opponent. Basic alpha-beta pruned minimax with a simple evaluation function.\n* `ui.js`: User interface code.\n* `chess.include.js`: Includes all of the above files.\n* `chess.css`: User interface style.\n* `chess.ico`: Icon.\n* `chess.html`: Main game file.\n* `test.js`: Automated tests.\n* `test.html`: Automated test runner.\n\n# Building\n\nTo compile the minified version using `compile.sh` in the `build` directory, you need [bash](http://git-scm.com/download/win) and the [Closure compiler](https://developers.google.com/closure/compiler/). You may need to adjust the `.jar` location in `compile.sh`. Compiled files are placed in the top-level directory.\n\nTo lint using `lint.sh` in the build directory, you need bash and [JavaScript Lint](http://www.javascriptlint.com/). You may need to adjust lint's path in `lint.sh`.\n\nTo run the tests, open `test.html` in the `src` directory.\n\n# TODO\n\n* Static exchange evaluation\n* Transposition table\n* Iterative deepening\n* Negamax formulation\n* AI randomness\n* Take game phase into account in evaluation\n* Take mobility into account in evaluation\n* Killer heuristic\n* Late-check castling legality\n* Tie-detection\n* Move pieces without drag and drop\n* Underpromotion\n* Show captured pieces in the UI\n* Don't hardcode board target div to UI\n* UI for loading game state from parsable Chess notation(s)\n* More tests\n\n# License\n\nThe Chess implementation is distributed under the [MIT](https://github.com/kbjorklu/chess/blob/master/LICENSE) license. See accompanying LICENSE file for details.\n\nThird-party components are distributed/used under their respective license:\n\n* jQuery: [MIT](https://github.com/jquery/jquery/blob/master/MIT-LICENSE.txt) (used via jQuery CDN)\n* jQuery UI: [MIT](https://github.com/jquery/jquery-ui/blob/master/MIT-LICENSE.txt) (used via jQuery CDN)\n* jQuery UI Touch Punch: [MIT](https://github.com/furf/jquery-ui-touch-punch/blob/master/jquery.ui.touch-punch.min.js) (used via CloudFlare CDN)\n* Augment.js: [MIT](https://github.com/olivernn/augment.js/blob/master/LICENSE) (used via CloudFlare CDN)\n* QUnit: [MIT](https://github.com/jquery/qunit/blob/master/MIT-LICENSE.txt) (used via jQuery CDN)\n* The jQuery extern file in the build directory: [Apache 2](http://www.apache.org/licenses/LICENSE-2.0)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkbjorklu%2Fchess","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkbjorklu%2Fchess","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkbjorklu%2Fchess/lists"}